Linux USB
 help / color / mirror / Atom feed
* [PATCH] usb: gadget: udc: renesas_usb3: disable runtime PM on probe error
@ 2026-11-30 13:10 Cong Nguyen
  2026-11-30 13:17 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages 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 related	[flat|nested] 2+ messages in thread

* Re: [PATCH] usb: gadget: udc: renesas_usb3: disable runtime PM on probe error
  2026-11-30 13:10 [PATCH] usb: gadget: udc: renesas_usb3: disable runtime PM on probe error Cong Nguyen
@ 2026-11-30 13:17 ` sashiko-bot
  0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-11-30 13:17 UTC (permalink / raw)
  To: Cong Nguyen; +Cc: linux-usb

> 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>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261130131012.2347007-1-congnt264@gmail.com?part=1

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

end of thread, other threads:[~2026-11-30 13:17 UTC | newest]

Thread overview: 2+ messages (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
2026-11-30 13:17 ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox