Re: [PATCH] iio: imu: adis16400: Check return value of spi_setup()
From: Jonathan Cameron
Date: Sun Sep 06 2026 - 22:24:43 EST
On Thu, 3 Sep 2026 16:35:35 +0300
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> wrote:
> On Thu, Sep 03, 2026 at 01:27:33PM +0100, Salah Triki wrote:
> > In adis16400_initial_setup(), the return value of spi_setup() was ignored.
> > If SPI configuration fails, the driver would proceed with the
> > initialization anyway, leading to undefined behavior or silent failures
> > during device setup.
> >
> > Check the return value of spi_setup() and return the error code immediately
> > if it fails.
>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
>
I assume in practice this never fails, so treating this as hardening
rather than an urgent fix. Applied to the testing branch of iio.git
Thanks,
Jonathan