X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=drivers%2Fphy%2Fphy-stih41x-usb.c;h=c093b472b57dadee94b832a989f5495a07dc98f2;hb=9497d7380b9c450830190c75aa43b25c278bb1f9;hp=a603801293ffec6581d37d1f871247914745fe97;hpb=0c49cd295d42d0032af11d55e2140dbec11dc8d0;p=cascardo%2Flinux.git diff --git a/drivers/phy/phy-stih41x-usb.c b/drivers/phy/phy-stih41x-usb.c index a603801293ff..c093b472b57d 100644 --- a/drivers/phy/phy-stih41x-usb.c +++ b/drivers/phy/phy-stih41x-usb.c @@ -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)