Files
linux-kernelorg-stable/drivers/iio
Antoniu Miclaus 5a435b0e46 iio: gyro: itg3200: Fix unchecked return value in read_raw
[ Upstream commit b79b24f578 ]

The return value from itg3200_read_reg_s16() is stored in ret but
never checked. The function unconditionally returns IIO_VAL_INT,
ignoring potential I2C read failures. This causes garbage data to
be returned to userspace when the read fails, with no error reported.

Add proper error checking to propagate the failure to callers.

Fixes: 9dbf091da0 ("iio: gyro: Add itg3200")
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2026-03-04 07:21:19 -05:00
..
2026-03-04 07:20:37 -05:00
2026-03-04 07:20:37 -05:00