Skip to contentSkip to conversation

Staging: iio: adt7316: Set the data field

PATCH Applied Shreeya Patel 2 participants 2 messages Nov 16, 2018 – Nov 17, 2018

Subsystems (4)

v1 of 3 Applied Latest is v3 →

lore
Share & tools
lore
#0 lore raw

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.

---
 drivers/staging/iio/addac/adt7316-i2c.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/staging/iio/addac/adt7316-i2c.c +2 -0
index f66dd3ebbab1..856bcfa60c6c 100644
@@ -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
maintainer Applied
#1 lore raw
Quoted 5 lines · On Sat, 17 Nov 2018 04:19:07 +0530 Shreeya Patel…

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.

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
index f66dd3ebbab1..856bcfa60c6c 100644
@@ -35,6 +35,8 @@ static int adt7316_i2c_read(void *client, u8 reg, u8 *data)
 		return ret;
 	}
 
+	*data = ret;
+
 	return 0;
 }