Re: [PATCH] iio: gyro: itg3200: Fix unchecked return value in read_raw
From: Andy Shevchenko
Date: Thu Jan 29 2026 - 10:55:32 EST
On Thu, Jan 29, 2026 at 05:01:45PM +0200, Antoniu Miclaus wrote:
> 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.
Yeah, but when it's not a series do not use --thread!
(P.S. do not resend, it's for the future now)
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
--
With Best Regards,
Andy Shevchenko