diff mbox series

[-next,v2] pinctrl: mcp23s08: Fix missing unlock on error in mcp23s08_irq()

Message ID 1623134048-56051-1-git-send-email-zou_wei@huawei.com
State Accepted
Commit 884af72c90016cfccd5717439c86b48702cbf184
Headers show
Series [-next,v2] pinctrl: mcp23s08: Fix missing unlock on error in mcp23s08_irq() | expand

Commit Message

Zou Wei June 8, 2021, 6:34 a.m. UTC
Add the missing unlock before return from function mcp23s08_irq()
in the error handling case.

v1-->v2:
   remove the "return IRQ_HANDLED" line

Fixes: 897120d41e7a ("pinctrl: mcp23s08: fix race condition in irq handler")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zou Wei <zou_wei@huawei.com>
---
 drivers/pinctrl/pinctrl-mcp23s08.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Linus Walleij June 9, 2021, 11:13 a.m. UTC | #1
On Tue, Jun 8, 2021 at 8:16 AM Zou Wei <zou_wei@huawei.com> wrote:

> Add the missing unlock before return from function mcp23s08_irq()

> in the error handling case.

>

> v1-->v2:

>    remove the "return IRQ_HANDLED" line

>

> Fixes: 897120d41e7a ("pinctrl: mcp23s08: fix race condition in irq handler")

> Reported-by: Hulk Robot <hulkci@huawei.com>

> Signed-off-by: Zou Wei <zou_wei@huawei.com>


Patch applied.

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/drivers/pinctrl/pinctrl-mcp23s08.c b/drivers/pinctrl/pinctrl-mcp23s08.c
index 799d596..d025957 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))