forked from Minki/linux
staging:iio:lis3l02dq: Do not return error code in 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
da0f01e1ed
commit
0b30246ef1
@ -143,7 +143,7 @@ static irqreturn_t lis3l02dq_trigger_handler(int irq, void *p)
|
|||||||
if (data == NULL) {
|
if (data == NULL) {
|
||||||
dev_err(indio_dev->dev.parent,
|
dev_err(indio_dev->dev.parent,
|
||||||
"memory alloc failed in buffer bh");
|
"memory alloc failed in buffer bh");
|
||||||
return -ENOMEM;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!bitmap_empty(indio_dev->active_scan_mask, indio_dev->masklength))
|
if (!bitmap_empty(indio_dev->active_scan_mask, indio_dev->masklength))
|
||||||
@ -156,8 +156,9 @@ static irqreturn_t lis3l02dq_trigger_handler(int irq, void *p)
|
|||||||
= pf->timestamp;
|
= pf->timestamp;
|
||||||
buffer->access->store_to(buffer, (u8 *)data, pf->timestamp);
|
buffer->access->store_to(buffer, (u8 *)data, pf->timestamp);
|
||||||
|
|
||||||
iio_trigger_notify_done(indio_dev->trig);
|
|
||||||
kfree(data);
|
kfree(data);
|
||||||
|
done:
|
||||||
|
iio_trigger_notify_done(indio_dev->trig);
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user