Skip to contentSkip to conversation

phy: omap-usb2: invoke pm_runtime_disable on error path

PATCH New Kishon Vijay Abraham I 1 participant 1 message May 4, 2015 Generic PHY framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/phy/phy-omap-usb2.c |    1 +
 1 file changed, 1 insertion(+)
drivers/phy/phy-omap-usb2.c +1 -0
index 183ef43..c1a4686 100644
@@ -275,6 +275,7 @@ static int omap_usb2_probe(struct platform_device *pdev)
 		phy->wkupclk = devm_clk_get(phy->dev, "usb_phy_cm_clk32k");
 		if (IS_ERR(phy->wkupclk)) {
 			dev_err(&pdev->dev, "unable to get usb_phy_cm_clk32k\n");
+			pm_runtime_disable(phy->dev);
 			return PTR_ERR(phy->wkupclk);
 		} else {
 			dev_warn(&pdev->dev,
Signature · 1 line
1.7.9.5