diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2012-07-04 16:09:00 (GMT) |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2012-07-08 19:02:29 (GMT) |
commit | 0b30246ef17c2e37819068aec3d5eac4ac06b562 (patch) | |
tree | b48a491b81e60e607f7114f240c9d993d394f29e /drivers/staging/iio | |
parent | da0f01e1ed88b4ac650d884e4e2ee11c9cd4d83b (diff) | |
download | linux-fsl-qoriq-0b30246ef17c2e37819068aec3d5eac4ac06b562.tar.xz |
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>
Diffstat (limited to 'drivers/staging/iio')
-rw-r--r-- | drivers/staging/iio/accel/lis3l02dq_ring.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/iio/accel/lis3l02dq_ring.c b/drivers/staging/iio/accel/lis3l02dq_ring.c index 51b00df..d7f8af7 100644 --- a/drivers/staging/iio/accel/lis3l02dq_ring.c +++ b/drivers/staging/iio/accel/lis3l02dq_ring.c @@ -143,7 +143,7 @@ static irqreturn_t lis3l02dq_trigger_handler(int irq, void *p) if (data == NULL) { dev_err(indio_dev->dev.parent, "memory alloc failed in buffer bh"); - return -ENOMEM; + goto done; } 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; buffer->access->store_to(buffer, (u8 *)data, pf->timestamp); - iio_trigger_notify_done(indio_dev->trig); kfree(data); +done: + iio_trigger_notify_done(indio_dev->trig); return IRQ_HANDLED; } |