i2c: i2c-mxs: Fix build warning
Subsystems (2)
PATCH 1/1 i2c: i2c-mxs: Fix build warning
Fix the following build warning:
drivers/i2c/busses/i2c-mxs.c:207:8: warning: 'data' may be used uninitialized in this function [-Wuninitialized]
--- drivers/i2c/busses/i2c-mxs.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/i2c/busses/i2c-mxs.c +1 -1
@@ -194,7 +194,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++) {
Signature · 1 line
1.7.1
A message that is not in the archive (sent off-list or not yet received): 1333656595-3600-1-git-send-email-festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Quoted 5 lines · Fabio Estevam
Fix the following build warning:
drivers/i2c/busses/i2c-mxs.c:207:8: warning: 'data' may be used uninitialized in this function [-Wuninitialized]Signed-off-by Fabio Estevam <[email protected]>
Do you agree with the compiler?
Signature · 2 lines
Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ |
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 8 lines · Wolfram Sang
Quoted 5 lines · Fabio Estevam
Fix the following build warning:
drivers/i2c/busses/i2c-mxs.c:207:8: warning: 'data' may be used uninitialized in this function [-Wuninitialized]Signed-off-by Fabio Estevam <[email protected]>Do you agree with the compiler?
After looking at it carefully I conclude that is not possible for 'data' to be used uninitialized.