From: Nuno Sa Date: Thu, 22 Apr 2021 10:19:04 +0000 (+0200) Subject: iio: adis16400: do not return ints in irq handlers X-Git-Tag: v5.12.17~174 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6bca37f0bf1e6b5b97e3e18251c1a33a93418dc5;p=thirdparty%2Fkernel%2Fstable.git iio: adis16400: do not return ints in irq handlers [ Upstream commit ab3df79782e7d8a27a58576c9b4e8c6c4879ad79 ] 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 Signed-off-by: Nuno Sa Link: https://lore.kernel.org/r/20210422101911.135630-3-nuno.sa@analog.com Signed-off-by: Jonathan Cameron Signed-off-by: Sasha Levin --- diff --git a/drivers/iio/imu/adis16400.c b/drivers/iio/imu/adis16400.c index 785a4ce606d89..4aff16466da02 100644 --- a/drivers/iio/imu/adis16400.c +++ b/drivers/iio/imu/adis16400.c @@ -647,9 +647,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;