From: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx> commit 3a29b84cf7fbf912a6ab1b9c886746f02b74ea25 upstream. If hid_sensor_set_report_latency() fails, the error code should be returned instead of a value likely to be interpreted as 'success'. Fixes: 138bc7969c24 ("iio: hid-sensor-hub: Implement batch mode") Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx> Link: https://patch.msgid.link/c50640665f091a04086e5092cf50f73f2055107a.1727980825.git.christophe.jaillet@xxxxxxxxxx Cc: <Stable@xxxxxxxxxxxxxxx> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/iio/common/hid-sensors/hid-sensor-trigger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c +++ b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c @@ -46,7 +46,7 @@ static ssize_t _hid_sensor_set_report_la latency = integer * 1000 + fract / 1000; ret = hid_sensor_set_report_latency(attrb, latency); if (ret < 0) - return len; + return ret; attrb->latency_ms = hid_sensor_get_report_latency(attrb); Patches currently in stable-queue which might be from christophe.jaillet@xxxxxxxxxx are queue-4.19/drm-stm-fix-an-error-handling-path-in-stm_drm_platfo.patch queue-4.19/iio-hid-sensors-fix-an-error-handling-path-in-_hid_sensor_set_report_latency.patch queue-4.19/net-ethernet-use-ip_hdrlen-instead-of-bit-shift.patch queue-4.19/pps-remove-usage-of-the-deprecated-ida_simple_xx-api.patch queue-4.19/fbdev-hpfb-fix-an-error-handling-path-in-hpfb_dio_pr.patch