Skip to content

Commit

Permalink
iio: adis16400: do not return ints in irq handlers
Browse files Browse the repository at this point in the history
[ Upstream commit ab3df79 ]

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: 5eda355 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
nunojsa authored and gregkh committed Jul 14, 2021
1 parent 48a4fc2 commit 6bca37f
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/iio/imu/adis16400.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6bca37f

Please sign in to comment.