* [PATCH] usb: gadget: udc: renesas_usb3: disable runtime PM on probe error
@ 2026-11-30 13:10 Cong Nguyen
0 siblings, 0 replies; only message in thread
From: Cong Nguyen @ 2026-11-30 13:10 UTC (permalink / raw)
To: Neill Kapron, Greg Kroah-Hartman
Cc: Yoshihiro Shimoda, linux-usb, linux-kernel
renesas_usb3_probe() calls pm_runtime_enable() before
usb_add_gadget_udc(). If usb_add_gadget_udc() or device_create_file()
fails, probe returns without calling pm_runtime_disable(), so the
enable stays unbalanced and a later probe of the device can warn.
Call pm_runtime_disable() at err_reset, as renesas_usb3_remove() does.
Fixes: d998844016b2 ("usb: gadget: udc: renesas_usb3: should call pm_runtime_enable() before add udc")
Signed-off-by: Cong Nguyen <congnt264@gmail.com>
---
drivers/usb/gadget/udc/renesas_usb3.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/gadget/udc/renesas_usb3.c b/drivers/usb/gadget/udc/renesas_usb3.c
index 0ebea52cbf2f..22d9839ce4cc 100644
--- a/drivers/usb/gadget/udc/renesas_usb3.c
+++ b/drivers/usb/gadget/udc/renesas_usb3.c
@@ -2966,6 +2966,7 @@ static int renesas_usb3_probe(struct platform_device *pdev)
usb_del_gadget_udc(&usb3->gadget);
err_reset:
+ pm_runtime_disable(&pdev->dev);
reset_control_assert(usb3->usbp_rstc);
err_add_udc:
--
2.25.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-30 13:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-30 13:10 [PATCH] usb: gadget: udc: renesas_usb3: disable runtime PM on probe error Cong Nguyen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®