Skip to content

Commit

Permalink
staging:iio:max1363: Do not return error code in interrupt handler
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lars-Peter Clausen authored and Jonathan Cameron committed Jul 8, 2012
1 parent 46b2495 commit da0f01e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/iio/adc/max1363_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ static irqreturn_t max1363_trigger_handler(int irq, void *p)
* no harm.
*/
if (numvals == 0)
return IRQ_HANDLED;
goto done;

rxbuf = kmalloc(d_size, GFP_KERNEL);
if (rxbuf == NULL)
return -ENOMEM;
goto done;
if (st->chip_info->bits != 8)
b_sent = i2c_master_recv(st->client, rxbuf, numvals*2);
else
Expand Down

0 comments on commit da0f01e

Please sign in to comment.