aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio
diff options
context:
space:
mode:
authorBrian Masney <masneyb@onstation.org>2018-04-20 20:41:43 -0400
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2018-04-28 16:17:59 +0100
commit3605dfb8510c52b3b2b5e0390cba29d54847a7b7 (patch)
tree6b25c6ddd8cb19a953c40d2398b2061459b8b214 /drivers/staging/iio
parentstaging: iio: tsl2x7x: move integration_time* attributes to IIO_INTENSITY channel (diff)
downloadlinux-dev-3605dfb8510c52b3b2b5e0390cba29d54847a7b7.tar.xz
linux-dev-3605dfb8510c52b3b2b5e0390cba29d54847a7b7.zip
staging: iio: tsl2x7x: don't return error in IRQ handler
tsl2x7x_event_handler() could return an error and this could cause the interrupt to remain masked. We shouldn't return an error in the interrupt handler so this patch always returns IRQ_HANDLED. An error will be logged if one occurs. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/staging/iio')
-rw-r--r--drivers/staging/iio/light/tsl2x7x.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/iio/light/tsl2x7x.c b/drivers/staging/iio/light/tsl2x7x.c
index eeccfbb0eb1f..955a08e57cf3 100644
--- a/drivers/staging/iio/light/tsl2x7x.c
+++ b/drivers/staging/iio/light/tsl2x7x.c
@@ -1328,7 +1328,7 @@ static irqreturn_t tsl2x7x_event_handler(int irq, void *private)
ret = tsl2x7x_read_status(chip);
if (ret < 0)
- return ret;
+ return IRQ_HANDLED;
/* What type of interrupt do we need to process */
if (ret & TSL2X7X_STA_PRX_INTR) {
@@ -1349,9 +1349,7 @@ static irqreturn_t tsl2x7x_event_handler(int irq, void *private)
timestamp);
}
- ret = tsl2x7x_clear_interrupts(chip, TSL2X7X_CMD_PROXALS_INT_CLR);
- if (ret < 0)
- return ret;
+ tsl2x7x_clear_interrupts(chip, TSL2X7X_CMD_PROXALS_INT_CLR);
return IRQ_HANDLED;
}