aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/can
diff options
context:
space:
mode:
authorIra W. Snyder <iws@ovro.caltech.edu>2014-01-29 12:58:25 -0500
committerMarc Kleine-Budde <mkl@pengutronix.de>2014-01-29 14:23:23 -0500
commit73615c8669ef1c497c942cae0d5079b95824332a (patch)
tree7af0322835373a0ffdf6e5853ed5b1c377761745 /drivers/net/can
parentbb5ecb0c63ac88b6f39029f75c47f4be4e352e8d (diff)
can: janz-ican3: fix uninitialized variable warnings
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 <iws@ovro.caltech.edu> Acked-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can')
-rw-r--r--drivers/net/can/janz-ican3.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/janz-ican3.c b/drivers/net/can/janz-ican3.c
index e24e6690d672..07f0ba03cd59 100644
--- a/drivers/net/can/janz-ican3.c
+++ b/drivers/net/can/janz-ican3.c
@@ -1322,7 +1322,7 @@ static int ican3_napi(struct napi_struct *napi, int budget)
1322 1322
1323 /* process all communication messages */ 1323 /* process all communication messages */
1324 while (true) { 1324 while (true) {
1325 struct ican3_msg msg; 1325 struct ican3_msg uninitialized_var(msg);
1326 ret = ican3_recv_msg(mod, &msg); 1326 ret = ican3_recv_msg(mod, &msg);
1327 if (ret) 1327 if (ret)
1328 break; 1328 break;