Re: [PATCH v2] iio: gyro: adxrs290: propagate chip ID read errors
From: Andy Shevchenko
Date: Fri Nov 20 2026 - 04:40:31 EST
On Fri, Nov 20, 2026 at 10:57:54AM +0800, Siqi Chen wrote:
> spi_w8r8() returns either an unsigned 8-bit value or a negative error.
> The probe function stores its return value in a u8, truncating errors and
> treating them as unexpected chip IDs. Consequently, an SPI transfer failure
> is reported as -ENODEV instead of the actual error.
>
> Store each result in an int and return negative errors before validating
> the chip IDs.
...
> - Move the OpenCode disclosure and testing information below the
> separator.
It's interesting that the other patch without this amendment was sent just
a half an hour before this one. If you get a comment against one, check all
the rest (at least for the same subsystem). Always.
--
With Best Regards,
Andy Shevchenko