Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3605dfb8 authored by Brian Masney's avatar Brian Masney Committed by Jonathan Cameron
Browse files

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: default avatarBrian Masney <masneyb@onstation.org>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 2f58efa9
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -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;
}