Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livep...
[cascardo/linux.git] / drivers / phy / phy-stih41x-usb.c
index a603801..c093b47 100644 (file)
@@ -87,8 +87,12 @@ static int stih41x_usb_phy_power_on(struct phy *phy)
                return ret;
        }
 
-       return regmap_update_bits(phy_dev->regmap, phy_dev->cfg->syscfg,
-                       phy_dev->cfg->oscok, phy_dev->cfg->oscok);
+       ret = regmap_update_bits(phy_dev->regmap, phy_dev->cfg->syscfg,
+                                phy_dev->cfg->oscok, phy_dev->cfg->oscok);
+       if (ret)
+               clk_disable_unprepare(phy_dev->clk);
+
+       return ret;
 }
 
 static int stih41x_usb_phy_power_off(struct phy *phy)