Thread (11 messages) 11 messages, 3 authors, 2012-05-12
STALE5151d

[PATCH 4/4] MXS: Fix GCC4.7 complaint in mxs-i2c

From: marex@denx.de (Marek Vasut)
Date: 2012-05-01 02:00:21
Also in: linux-i2c
Subsystem: i2c subsystem, i2c subsystem host drivers, the rest · Maintainers: Andi Shyti, Linus Torvalds

drivers/i2c/busses/i2c-mxs.c: In function 'mxs_i2c_xfer':
drivers/i2c/busses/i2c-mxs.c:253:8: warning: 'data' may be used uninitialized in this function [-Wmaybe-uninitialized]
drivers/i2c/busses/i2c-mxs.c:243:6: note: 'data' was declared here

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Detlev Zundel <redacted>
CC: Dong Aisheng <redacted>
CC: Fabio Estevam <redacted>
Cc: Linux ARM kernel <redacted>
Cc: linux-i2c at vger.kernel.org
CC: Sascha Hauer <s.hauer@pengutronix.de>
CC: Shawn Guo <redacted>
Cc: Stefano Babic <redacted>
CC: Uwe Kleine-K?nig <redacted>
Cc: Wolfgang Denk <redacted>
Cc: Wolfram Sang <redacted>
---
 drivers/i2c/busses/i2c-mxs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-mxs.c b/drivers/i2c/busses/i2c-mxs.c
index 7491194..89ea19d 100644
--- a/drivers/i2c/busses/i2c-mxs.c
+++ b/drivers/i2c/busses/i2c-mxs.c
@@ -240,7 +240,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 data = 0;
 	int i;
 
 	for (i = 0; i < len; i++) {
-- 
1.7.10
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help