linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] pinctrl: mcp23s08: Fix missing unlock on error in mcp23s08_irq()
@ 2021-06-07 12:44 Zou Wei
  2021-06-08  3:22 ` Samuel Zou
  0 siblings, 1 reply; 2+ messages in thread
From: Zou Wei @ 2021-06-07 12:44 UTC (permalink / raw)
  To: linus.walleij, radim.pavlik; +Cc: linux-gpio, linux-kernel, Zou Wei

Add the missing unlock before return from function mcp23s08_irq()
in the error handling case.

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 | 1 +
 1 file changed, 1 insertion(+)

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] pinctrl: mcp23s08: Fix missing unlock on error in mcp23s08_irq()
  2021-06-07 12:44 [PATCH -next] pinctrl: mcp23s08: Fix missing unlock on error in mcp23s08_irq() Zou Wei
@ 2021-06-08  3:22 ` Samuel Zou
  0 siblings, 0 replies; 2+ messages in thread
From: Samuel Zou @ 2021-06-08  3:22 UTC (permalink / raw)
  To: linus.walleij, radim.pavlik; +Cc: linux-gpio, linux-kernel



On 2021/6/7 20:44, Zou Wei wrote:
> Add the missing unlock before return from function mcp23s08_irq()
> in the error handling case.
> 
> 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 | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/pinctrl/pinctrl-mcp23s08.c b/drivers/pinctrl/pinctrl-mcp23s08.c
> index 799d596..e12aa09 100644
> --- a/drivers/pinctrl/pinctrl-mcp23s08.c
> +++ b/drivers/pinctrl/pinctrl-mcp23s08.c
> @@ -353,6 +353,7 @@ static irqreturn_t mcp23s08_irq(int irq, void *data)
>   
>   	if (intf == 0) {
>   		/* There is no interrupt pending */
> +		goto unlock;
>   		return IRQ_HANDLED;
One mistake here is to forget to delete the "return IRQ_HANDLED" line, 
please ignore this patch, I will send v2 later.
>   	}
>   
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-08  3:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-07 12:44 [PATCH -next] pinctrl: mcp23s08: Fix missing unlock on error in mcp23s08_irq() Zou Wei
2021-06-08  3:22 ` Samuel Zou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).