diff options
author | Kishon Vijay Abraham I <kishon@ti.com> | 2015-05-04 12:37:33 -0400 |
---|---|---|
committer | Kishon Vijay Abraham I <kishon@ti.com> | 2015-05-12 11:27:19 -0400 |
commit | 4581f798ec7373bea4530b7e57e6c6842f132bbd (patch) | |
tree | 5f44454cbb9bf7f3fdda8a94719f1949a8f57871 /drivers/phy | |
parent | 7f7a4d306ff87502dc26860f54e798693cf9b1e1 (diff) |
phy: omap-usb2: invoke pm_runtime_disable on error path
if devm_clk_get for wkupclk fails, there will be an unbalanced
pm_runtime_enable. Fix it here.
Reported-by: Benoit Parrot <bparrot@ti.com>
Cc: Roger Quadros <rogerq@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'drivers/phy')
-rw-r--r-- | drivers/phy/phy-omap-usb2.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/phy/phy-omap-usb2.c b/drivers/phy/phy-omap-usb2.c index 183ef4368101..c1a468686bdc 100644 --- a/drivers/phy/phy-omap-usb2.c +++ b/drivers/phy/phy-omap-usb2.c | |||
@@ -275,6 +275,7 @@ static int omap_usb2_probe(struct platform_device *pdev) | |||
275 | phy->wkupclk = devm_clk_get(phy->dev, "usb_phy_cm_clk32k"); | 275 | phy->wkupclk = devm_clk_get(phy->dev, "usb_phy_cm_clk32k"); |
276 | if (IS_ERR(phy->wkupclk)) { | 276 | if (IS_ERR(phy->wkupclk)) { |
277 | dev_err(&pdev->dev, "unable to get usb_phy_cm_clk32k\n"); | 277 | dev_err(&pdev->dev, "unable to get usb_phy_cm_clk32k\n"); |
278 | pm_runtime_disable(phy->dev); | ||
278 | return PTR_ERR(phy->wkupclk); | 279 | return PTR_ERR(phy->wkupclk); |
279 | } else { | 280 | } else { |
280 | dev_warn(&pdev->dev, | 281 | dev_warn(&pdev->dev, |