* [PATCH] usb: gadget: tegra-xudc: Fix PM disable depth imbalance on error path
@ 2020-11-12 13:35 Zhang Qilong
0 siblings, 0 replies; only message in thread
From: Zhang Qilong @ 2020-11-12 13:35 UTC (permalink / raw)
To: balbi, gregkh, thierry.reding, jonathanh; +Cc: linux-usb, linux-tegra
The pm_runtime_enable will increase power disable depth. Imbalance
depth will resulted in enabling runtime PM of device fails later.
Thus a pairing decrement must be needed on the error handling path
to keep it balanced.
Fixes: 49db427232fe2 ("usb: gadget: Add UDC driver for tegra XUSB device mode controller")
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
---
drivers/usb/gadget/udc/tegra-xudc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/gadget/udc/tegra-xudc.c b/drivers/usb/gadget/udc/tegra-xudc.c
index 580bef8eb4cb..ad205e178033 100644
--- a/drivers/usb/gadget/udc/tegra-xudc.c
+++ b/drivers/usb/gadget/udc/tegra-xudc.c
@@ -3861,6 +3861,7 @@ static int tegra_xudc_probe(struct platform_device *pdev)
return 0;
free_eps:
+ pm_runtime_disable(&pdev->dev);
tegra_xudc_free_eps(xudc);
free_event_ring:
tegra_xudc_free_event_ring(xudc);
--
2.25.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-11-12 13:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-12 13:35 [PATCH] usb: gadget: tegra-xudc: Fix PM disable depth imbalance on error path Zhang Qilong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).