From: Shreeya Patel Date: Fri, 16 Nov 2018 22:49:07 +0000 (+0530) Subject: Staging: iio: adt7316: Fix i2c data reading, set the data field X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=688cd642ba0c393344c802647848da5f0d925d0e;p=openwrt%2Fstaging%2Fblogic.git Staging: iio: adt7316: Fix i2c data reading, 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. This is an ancient bug, and as no one seems to have noticed, probably no sense in applying it to stable. Signed-off-by: Shreeya Patel Signed-off-by: Jonathan Cameron --- diff --git a/drivers/staging/iio/addac/adt7316-i2c.c b/drivers/staging/iio/addac/adt7316-i2c.c index f66dd3ebbab1..856bcfa60c6c 100644 --- a/drivers/staging/iio/addac/adt7316-i2c.c +++ b/drivers/staging/iio/addac/adt7316-i2c.c @@ -35,6 +35,8 @@ static int adt7316_i2c_read(void *client, u8 reg, u8 *data) return ret; } + *data = ret; + return 0; }