i2c: i2c_master_send(): don't leave flags uninitialized
PATCH 1/1 i2c: i2c_master_send(): don't leave flags uninitialized
Leaving the flags field unitialized can lead to performing read operation instead of write operation.
Signed-off-by Antony Pavlov <[email protected]>
--- drivers/i2c/i2c.c | 1 + 1 file changed, 1 insertion(+)
drivers/i2c/i2c.c +1 -0
@@ -117,6 +117,7 @@ int i2c_master_send(struct i2c_client *client, const char *buf, int count)int ret; msg.addr = client->addr; + msg.flags =0 ; msg.len = count; msg.buf = (char *)buf;
Signature · 7 lines
2.15.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
AppliedQuoted 8 lines · Antony Pavlov
Leaving the flags field unitialized can lead to performing read operation instead of write operation.
Signed-off-by Antony Pavlov <[email protected]>--- drivers/i2c/i2c.c | 1 + 1 file changed, 1 insertion(+)
Applied, thanks
Sascha
Quoted 16 lines
drivers/i2c/i2c.c +1
-0@@ -117,6 +117,7 @@ int i2c_master_send(struct i2c_client *client, const char *buf, int count)int ret; msg.addr = client->addr; + msg.flags =0 ; msg.len = count; msg.buf = (char *)buf;Signature · 1 line
2.15.1
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox