* [PATCH 0/1] usb: cdns3 fixes on usb-next
@ 2026-05-14 1:01 Peter Chen
2026-05-14 1:01 ` [PATCH 1/1] usb: cdns3: plat: fix leaked role switch on core role initialization failure Peter Chen
0 siblings, 1 reply; 2+ messages in thread
From: Peter Chen @ 2026-05-14 1:01 UTC (permalink / raw)
To: gregkh, pawell, rogerq; +Cc: linux-usb, cix-kernel-upstream, Peter Chen
One fix reported by sashiko-bot@kernel.org.
Peter Chen (1):
usb: cdns3: plat: fix leaked role switch on core role initialization
failure
drivers/usb/cdns3/cdns3-plat.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--
2.50.1
^ permalink raw reply [flat|nested] 2+ messages in thread* [PATCH 1/1] usb: cdns3: plat: fix leaked role switch on core role initialization failure
2026-05-14 1:01 [PATCH 0/1] usb: cdns3 fixes on usb-next Peter Chen
@ 2026-05-14 1:01 ` Peter Chen
0 siblings, 0 replies; 2+ messages in thread
From: Peter Chen @ 2026-05-14 1:01 UTC (permalink / raw)
To: gregkh, pawell, rogerq
Cc: linux-usb, cix-kernel-upstream, Peter Chen, sashiko-bot
Calling usb_role_switch_unregister if core role initialization failure.
Fixes: e4d7362dc9cd ("usb: cdns3: Add USBSSP platform driver support")
Reported-by: sashiko-bot <sashiko-bot@kernel.org>
Closes: https://lore.kernel.org/linux-devicetree/agKaEePSFknhDBg2@nchen-desktop/T/#m21e1d9c1574eb127ce03c0c2a1a49002ce435b52
Signed-off-by: Peter Chen <peter.chen@cixtech.com>
---
drivers/usb/cdns3/cdns3-plat.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/cdns3/cdns3-plat.c b/drivers/usb/cdns3/cdns3-plat.c
index 3fe3109a3688..91159910fe95 100644
--- a/drivers/usb/cdns3/cdns3-plat.c
+++ b/drivers/usb/cdns3/cdns3-plat.c
@@ -167,7 +167,7 @@ static int cdns3_plat_probe(struct platform_device *pdev)
cdns->host_init = cdns3_plat_host_init;
ret = cdns_core_init_role(cdns);
if (ret)
- goto err_cdns_init;
+ goto err_cdns_init_role;
device_set_wakeup_capable(dev, true);
pm_runtime_set_active(dev);
@@ -186,6 +186,9 @@ static int cdns3_plat_probe(struct platform_device *pdev)
return 0;
+err_cdns_init_role:
+ if (cdns->role_sw)
+ usb_role_switch_unregister(cdns->role_sw);
err_cdns_init:
set_phy_power_off(cdns);
err_phy_power_on:
--
2.50.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-14 1:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-14 1:01 [PATCH 0/1] usb: cdns3 fixes on usb-next Peter Chen
2026-05-14 1:01 ` [PATCH 1/1] usb: cdns3: plat: fix leaked role switch on core role initialization failure Peter Chen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox