Skip to content

Commit 3a29b84

Browse files
tititiou36jic23
authored andcommitted
iio: hid-sensors: Fix an error handling path in _hid_sensor_set_report_latency()
If hid_sensor_set_report_latency() fails, the error code should be returned instead of a value likely to be interpreted as 'success'. Fixes: 138bc79 ("iio: hid-sensor-hub: Implement batch mode") Signed-off-by: Christophe JAILLET <[email protected]> Acked-by: Srinivas Pandruvada <[email protected]> Link: https://patch.msgid.link/c50640665f091a04086e5092cf50f73f2055107a.1727980825.git.christophe.jaillet@wanadoo.fr Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
1 parent ccf9af8 commit 3a29b84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iio/common/hid-sensors/hid-sensor-trigger.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ static ssize_t _hid_sensor_set_report_latency(struct device *dev,
3232
latency = integer * 1000 + fract / 1000;
3333
ret = hid_sensor_set_report_latency(attrb, latency);
3434
if (ret < 0)
35-
return len;
35+
return ret;
3636

3737
attrb->latency_ms = hid_sensor_get_report_latency(attrb);
3838

0 commit comments

Comments
 (0)