patch "iio: stk3310: Don't return error code in interrupt handler" added to char-misc-linus
Subsystems (2)
This is a note to let you know that I've just added the patch titled
iio: stk3310: Don't return error code in interrupt handler
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
From 8e1eeca5afa7ba84d885987165dbdc5decf15413 Mon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 24 Oct 2021 19:12:51 +0200
Subject: iio: stk3310: Don't return error code in interrupt handler
Interrupt handlers must return one of the irqreturn_t values. Returning a error code is not supported.
The stk3310 event interrupt handler returns an error code when reading the flags register fails.
Fix the implementation to always return an irqreturn_t value.
--- drivers/iio/light/stk3310.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/iio/light/stk3310.c +3 -3
@@ -546,9 +546,8 @@ static irqreturn_t stk3310_irq_event_handler(int irq, void *private)mutex_lock (&data->lock); ret =regmap_field_read (data->reg_flag_nf, &dir);if (ret <0 ) { -dev_err (&data->client->dev,"register read failed\n" ); -mutex_unlock (&data->lock); -return ret; +dev_err (&data->client->dev,"register read failed: %d\n" , ret); + goto out; } event = IIO_UNMOD_EVENT_CODE(IIO_PROXIMITY, 1, IIO_EV_TYPE_THRESH,
@@ -560,6 +559,7 @@ static irqreturn_t stk3310_irq_event_handler(int irq, void *private) ret =regmap_field_write (data->reg_flag_psint,0 );if (ret <0 )dev_err (&data->client->dev,"failed to reset interrupts\n" ); +out:mutex_unlock (&data->lock);return IRQ_HANDLED ;
Signature · 1 line
2.34.1