diff mbox series

pinctrl: mcp23s08: missing unlock in mcp23s08_irq()

Message ID YMHjoagGxEfVBW1t@mwanda
State New
Headers show
Series pinctrl: mcp23s08: missing unlock in mcp23s08_irq() | expand

Commit Message

Dan Carpenter June 10, 2021, 10:04 a.m. UTC
This code needs to drop the lock before returning.

Fixes: 897120d41e7a ("pinctrl: mcp23s08: fix race condition in irq handler")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/pinctrl/pinctrl-mcp23s08.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Linus Walleij June 11, 2021, 11:56 p.m. UTC | #1
On Thu, Jun 10, 2021 at 12:04 PM Dan Carpenter <dan.carpenter@oracle.com> wrote:

> This code needs to drop the lock before returning.
>
> Fixes: 897120d41e7a ("pinctrl: mcp23s08: fix race condition in irq handler")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Zhou Wei already sent an identical patch but thanks anyway!

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/drivers/pinctrl/pinctrl-mcp23s08.c b/drivers/pinctrl/pinctrl-mcp23s08.c
index 799d596a1a4b..d0259577934e 100644
--- a/drivers/pinctrl/pinctrl-mcp23s08.c
+++ b/drivers/pinctrl/pinctrl-mcp23s08.c
@@ -353,7 +353,7 @@  static irqreturn_t mcp23s08_irq(int irq, void *data)
 
 	if (intf == 0) {
 		/* There is no interrupt pending */
-		return IRQ_HANDLED;
+		goto unlock;
 	}
 
 	if (mcp_read(mcp, MCP_INTCAP, &intcap))