mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 11:19:37 +00:00
staging:iio:adis16260: Do not return error code in the interrupt handler
The interrupt handler should only ever return one of the three irqreturn_t constants and not an error code. Also make sure to always call iio_trigger_notify_done before leaving the trigger handler. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
parent
67bd5e26d4
commit
b82ed7d680
1 changed files with 3 additions and 2 deletions
|
@ -69,7 +69,7 @@ static irqreturn_t adis16260_trigger_handler(int irq, void *p)
|
|||
data = kmalloc(indio_dev->scan_bytes, GFP_KERNEL);
|
||||
if (data == NULL) {
|
||||
dev_err(&st->us->dev, "memory alloc failed in ring bh");
|
||||
return -ENOMEM;
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (!bitmap_empty(indio_dev->active_scan_mask, indio_dev->masklength) &&
|
||||
|
@ -84,8 +84,9 @@ static irqreturn_t adis16260_trigger_handler(int irq, void *p)
|
|||
|
||||
ring->access->store_to(ring, (u8 *)data, pf->timestamp);
|
||||
|
||||
iio_trigger_notify_done(indio_dev->trig);
|
||||
kfree(data);
|
||||
done:
|
||||
iio_trigger_notify_done(indio_dev->trig);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue