From: Zhang Qilong Date: Mon, 23 Nov 2020 14:57:19 +0000 (+0800) Subject: usb: ehci-omap: Fix PM disable depth umbalance in ehci_hcd_omap_probe X-Git-Tag: io_uring-5.11-2020-12-23~77^2~32 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=d6ff32478d7e95d6ca199b5c852710d6964d5811;p=linux-block.git usb: ehci-omap: Fix PM disable depth umbalance in ehci_hcd_omap_probe The pm_runtime_enable will decrement the 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: 6c984b066d84b ("ARM: OMAP: USBHOST: Replace usbhs core driver APIs by Runtime pm APIs") Acked-by: Alan Stern Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20201123145719.1455849-1-zhangqilong3@huawei.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c index 8771a2ed6926..7f4a03e8647a 100644 --- a/drivers/usb/host/ehci-omap.c +++ b/drivers/usb/host/ehci-omap.c @@ -220,6 +220,7 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev) err_pm_runtime: pm_runtime_put_sync(dev); + pm_runtime_disable(dev); err_phy: for (i = 0; i < omap->nports; i++) {