Staging: iio: adt7316: Set the data field
Subsystems (4)
PATCH 1/7 Staging: iio: adt7316: Set the data field
adt7316_i2c_read function nowhere sets the data field. It is necessary to have an appropriate value for it. Hence, assign the value stored in 'ret' variable to data field.
Signed-off-by Shreeya Patel <[email protected]>
--- drivers/staging/iio/addac/adt7316-i2c.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/staging/iio/addac/adt7316-i2c.c +2 -0
@@ -35,6 +35,8 @@ static int adt7316_i2c_read(void *client, u8 reg, u8 *data)return ret; } + *data = ret; +return 0 ; }
Signature · 1 line
2.17.1
Quoted 5 lines · On Sat, 17 Nov 2018 04:19:07 +0530 Shreeya Patel…
adt7316_i2c_readfunction nowhere sets the data field. It is necessary to have an appropriate value for it. Hence, assign the value stored in 'ret' variable to data field.Signed-off-by Shreeya Patel <[email protected]>
I have amended the description slightly to make it clear this is a fix and that it has been broken so long we aren't that bothered about it going into stable!
Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it.
Thanks,
Jonathan
Quoted 17 lines
--- drivers/staging/iio/addac/adt7316-i2c.c | 2 ++ 1 file changed, 2 insertions(+)drivers/staging/iio/addac/adt7316-i2c.c +2
-0@@ -35,6 +35,8 @@ static int adt7316_i2c_read(void *client, u8 reg, u8 *data)return ret; } + *data = ret; +return 0 ; }