diff mbox series

[2/2] usb: cdns3: core: fix goto label for error path

Message ID 20201126065409.7533-2-peter.chen@kernel.org (mailing list archive)
State Accepted
Commit 6b8137517e70f6e96d0251a98930b1f29d0be161
Headers show
Series [1/2] usb: cdns3: gadget: clear trb->length as zero after preparing every trb | expand

Commit Message

Peter Chen Nov. 26, 2020, 6:54 a.m. UTC
From: Peter Chen <peter.chen@nxp.com>

The usb_role_switch_register has already called, so if the devm_request_irq
has failed, it needs to call usb_role_switch_unregister.

Fixes: b1234e3b3b26 ("usb: cdns3: add runtime PM support")
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
 drivers/usb/cdns3/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sergey Shtylyov Nov. 26, 2020, 10:13 a.m. UTC | #1
Hello!

On 26.11.2020 9:54, Peter Chen wrote:

> From: Peter Chen <peter.chen@nxp.com>
> 
> The usb_role_switch_register has already called, so if the devm_request_irq
                                   ^ been

> has failed, it needs to call usb_role_switch_unregister.
> 
> Fixes: b1234e3b3b26 ("usb: cdns3: add runtime PM support")
> Signed-off-by: Peter Chen <peter.chen@nxp.com>
[...]

MBR, Sergei
Peter Chen Nov. 27, 2020, 6:48 a.m. UTC | #2
On 20-11-26 13:13:16, Sergei Shtylyov wrote:
> Hello!
> 
> On 26.11.2020 9:54, Peter Chen wrote:
> 
> > From: Peter Chen <peter.chen@nxp.com>
> > 
> > The usb_role_switch_register has already called, so if the devm_request_irq
>                                   ^ been
> 

Thanks, will fix it.

> > has failed, it needs to call usb_role_switch_unregister.
> > 
> > Fixes: b1234e3b3b26 ("usb: cdns3: add runtime PM support")
> > Signed-off-by: Peter Chen <peter.chen@nxp.com>
> [...]
> 
> MBR, Sergei
diff mbox series

Patch

diff --git a/drivers/usb/cdns3/core.c b/drivers/usb/cdns3/core.c
index 170deb3eacf0..039ab5d2435e 100644
--- a/drivers/usb/cdns3/core.c
+++ b/drivers/usb/cdns3/core.c
@@ -553,7 +553,7 @@  static int cdns3_probe(struct platform_device *pdev)
 
 		if (ret) {
 			dev_err(cdns->dev, "couldn't register wakeup irq handler\n");
-			goto err3;
+			goto err4;
 		}
 	}