i2c: mxs: mxs_i2c_finish_read: mute flase positive uninitialized var
authorMarc Kleine-Budde <mkl@pengutronix.de>
Sun, 1 Jul 2012 21:34:30 +0000 (23:34 +0200)
committerWolfram Sang <w.sang@pengutronix.de>
Mon, 9 Jul 2012 11:08:15 +0000 (13:08 +0200)
This patch mutes the false positive compiler warning:

drivers/i2c/busses/i2c-mxs.c: In function 'mxs_i2c_xfer_msg':
drivers/i2c/busses/i2c-mxs.c:206:8: warning: 'data' may be used uninitialized in this function [-Wuninitialized]
drivers/i2c/busses/i2c-mxs.c:196:6: note: 'data' was declared here

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
drivers/i2c/busses/i2c-mxs.c

index 04eb441..02ce1fa 100644 (file)
@@ -193,7 +193,7 @@ static int mxs_i2c_wait_for_data(struct mxs_i2c_dev *i2c)
 
 static int mxs_i2c_finish_read(struct mxs_i2c_dev *i2c, u8 *buf, int len)
 {
-       u32 data;
+       u32 uninitialized_var(data);
        int i;
 
        for (i = 0; i < len; i++) {