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:30 (GMT) |
commit | b82ed7d6805ef2a31503999edc80787083d4426f (patch) | |
tree | 06b34ed2c853ee656dd66031524bf8117eb04dc7 /drivers/staging/iio | |
parent | 67bd5e26d44a5282d46719325b25deedebc39b2e (diff) | |
download | linux-fsl-qoriq-b82ed7d6805ef2a31503999edc80787083d4426f.tar.xz |
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>
Diffstat (limited to 'drivers/staging/iio')
-rw-r--r-- | drivers/staging/iio/gyro/adis16260_ring.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/iio/gyro/adis16260_ring.c b/drivers/staging/iio/gyro/adis16260_ring.c index 0fe2d9d..eeee8e7 100644 --- a/drivers/staging/iio/gyro/adis16260_ring.c +++ b/drivers/staging/iio/gyro/adis16260_ring.c @@ -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; } |