Skip to content

Commit

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

On an IRQ handler we should not return normal error codes as 'irqreturn_t'
is expected.

This is done by jumping to the 'check_burst32' label where we return
'IRQ_HANDLED'. Note that it is fine to do the burst32 check in this
error path. If we have proper settings to apply burst32, we might just
do the setup now so that the next sample already uses it.

Fixes: fff7352 ("iio: imu: Add support for adis16475")
Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20210427085454.30616-2-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 6bca37f commit fca9718
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/iio/imu/adis16475.c
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ static irqreturn_t adis16475_trigger_handler(int irq, void *p)

ret = spi_sync(adis->spi, &adis->msg);
if (ret)
return ret;
goto check_burst32;

adis->spi->max_speed_hz = cached_spi_speed_hz;
buffer = adis->buffer;
Expand Down

0 comments on commit fca9718

Please sign in to comment.