iio: adis16400: do not return ints in irq handlers
authorNuno Sa <nuno.sa@analog.com>
Thu, 22 Apr 2021 10:19:04 +0000 (12:19 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 17 May 2021 12:49:06 +0000 (13:49 +0100)
On an IRQ handler we should not return normal error codes as 'irqreturn_t'
is expected.

Not necessary to apply to stable as the original check cannot fail and
as such the bug cannot actually occur.

Fixes: 5eda3550a3cc1 ("staging:iio:adis16400: Preallocate transfer message")
Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20210422101911.135630-3-nuno.sa@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/adis16400.c

index 768aa493a1a60d36bf240b0abffa671d46b6415b..b2f92b55b910c23d4386884a182ff1b4a5751401 100644 (file)
@@ -645,9 +645,6 @@ static irqreturn_t adis16400_trigger_handler(int irq, void *p)
        void *buffer;
        int ret;
 
-       if (!adis->buffer)
-               return -ENOMEM;
-
        if (!(st->variant->flags & ADIS16400_NO_BURST) &&
                st->adis.spi->max_speed_hz > ADIS16400_SPI_BURST) {
                st->adis.spi->max_speed_hz = ADIS16400_SPI_BURST;