diff mbox series

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

Message ID 20201126065409.7533-2-peter.chen@kernel.org
State New
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(-)
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;
 		}
 	}