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:27 (GMT) |
commit | f654a7e2b2106aec324f931fb802ffe191a460dd (patch) | |
tree | 4de9268bae2a415c77d3597b67efdfb2fcf0cd34 /drivers/staging/iio | |
parent | a1bdeefd7bccabb265fa9c74811008a8582c1c7d (diff) | |
download | linux-fsl-qoriq-f654a7e2b2106aec324f931fb802ffe191a460dd.tar.xz |
staging:iio:ad799x: 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/adc/ad799x_core.c | 5 | ||||
-rw-r--r-- | drivers/staging/iio/adc/ad799x_ring.c | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/drivers/staging/iio/adc/ad799x_core.c b/drivers/staging/iio/adc/ad799x_core.c index 2d4bda9..9900507 100644 --- a/drivers/staging/iio/adc/ad799x_core.c +++ b/drivers/staging/iio/adc/ad799x_core.c @@ -350,10 +350,10 @@ static irqreturn_t ad799x_event_handler(int irq, void *private) ret = ad799x_i2c_read8(st, AD7998_ALERT_STAT_REG, &status); if (ret) - return ret; + goto done; if (!status) - return -EIO; + goto done; ad799x_i2c_write8(st, AD7998_ALERT_STAT_REG, AD7998_ALERT_STAT_CLEAR); @@ -372,6 +372,7 @@ static irqreturn_t ad799x_event_handler(int irq, void *private) iio_get_time_ns()); } +done: return IRQ_HANDLED; } diff --git a/drivers/staging/iio/adc/ad799x_ring.c b/drivers/staging/iio/adc/ad799x_ring.c index 0882c9e..858a685 100644 --- a/drivers/staging/iio/adc/ad799x_ring.c +++ b/drivers/staging/iio/adc/ad799x_ring.c @@ -81,8 +81,6 @@ static irqreturn_t ad799x_trigger_handler(int irq, void *p) ring->access->store_to(indio_dev->buffer, rxbuf, time_ns); done: kfree(rxbuf); - if (b_sent < 0) - return b_sent; out: iio_trigger_notify_done(indio_dev->trig); |