]> Git Repo - linux.git/commitdiff
can: janz-ican3: fix uninitialized variable warnings
authorIra W. Snyder <[email protected]>
Wed, 29 Jan 2014 17:58:25 +0000 (09:58 -0800)
committerMarc Kleine-Budde <[email protected]>
Wed, 29 Jan 2014 19:23:23 +0000 (20:23 +0100)
Analysis of the code shows that the struct ican3_msg variable cannot be
used uninitialized. Error conditions are checked and the loop terminates
before calling the ican3_handle_message() function with an uninitialized
value.

Signed-off-by: Ira W. Snyder <[email protected]>
Acked-by: Oliver Hartkopp <[email protected]>
Signed-off-by: Marc Kleine-Budde <[email protected]>
drivers/net/can/janz-ican3.c

index e24e6690d672bfb9f5b2315d2927c1fd8e9b89bd..07f0ba03cd59e981078320a20424d7f583260db2 100644 (file)
@@ -1322,7 +1322,7 @@ static int ican3_napi(struct napi_struct *napi, int budget)
 
        /* process all communication messages */
        while (true) {
-               struct ican3_msg msg;
+               struct ican3_msg uninitialized_var(msg);
                ret = ican3_recv_msg(mod, &msg);
                if (ret)
                        break;
This page took 0.054135 seconds and 4 git commands to generate.