Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <stern@rowland.harvard.edu>
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Link: https://lore.kernel.org/r/20201123145719.1455849-1-zhangqilong3@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Zhang Qilong and committed by
Greg Kroah-Hartman
d6ff3247 c1373f10

+1
+1
drivers/usb/host/ehci-omap.c
··· 220 220 221 221 err_pm_runtime: 222 222 pm_runtime_put_sync(dev); 223 + pm_runtime_disable(dev); 223 224 224 225 err_phy: 225 226 for (i = 0; i < omap->nports; i++) {