[PATCH 1/7] iio: adis_buffer: do not return ints in irq handlers

Nuno Sa
2021-04-13T11:19:08Z

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

Fixes: ccd2b52f4ac69 ("staging:iio: Add common ADIS library")
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
---
drivers/iio/imu/adis_buffer.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/iio/imu/adis_buffer.c b/drivers/iio/imu/adis_buffer.c
index ac354321f63a..f89bce10090a 100644
--- a/drivers/iio/imu/adis_buffer.c
+++ b/drivers/iio/imu/adis_buffer.c
@@ -130,7 +130,7 @@ static irqreturn_t adis_trigger_handler(int irq, void *p)
int ret;

if (!adis->buffer)
- return -ENOMEM;
+ goto irq_done;

if (adis->data->has_paging) {
mutex_lock(&adis->state_lock);
@@ -154,6 +154,7 @@ static irqreturn_t adis_trigger_handler(int irq, void *p)
iio_push_to_buffers_with_timestamp(indio_dev, adis->buffer,
pf->timestamp);

+irq_done:
iio_trigger_notify_done(indio_dev->trig);

return IRQ_HANDLED;
--
2.31.1