aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/phy/phy-generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/phy/phy-generic.c')
-rw-r--r--drivers/usb/phy/phy-generic.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c
index 980c9dee09eb..427efb5eebae 100644
--- a/drivers/usb/phy/phy-generic.c
+++ b/drivers/usb/phy/phy-generic.c
@@ -144,14 +144,18 @@ static irqreturn_t nop_gpio_vbus_thread(int irq, void *data)
144int usb_gen_phy_init(struct usb_phy *phy) 144int usb_gen_phy_init(struct usb_phy *phy)
145{ 145{
146 struct usb_phy_generic *nop = dev_get_drvdata(phy->dev); 146 struct usb_phy_generic *nop = dev_get_drvdata(phy->dev);
147 int ret;
147 148
148 if (!IS_ERR(nop->vcc)) { 149 if (!IS_ERR(nop->vcc)) {
149 if (regulator_enable(nop->vcc)) 150 if (regulator_enable(nop->vcc))
150 dev_err(phy->dev, "Failed to enable power\n"); 151 dev_err(phy->dev, "Failed to enable power\n");
151 } 152 }
152 153
153 if (!IS_ERR(nop->clk)) 154 if (!IS_ERR(nop->clk)) {
154 clk_prepare_enable(nop->clk); 155 ret = clk_prepare_enable(nop->clk);
156 if (ret)
157 return ret;
158 }
155 159
156 nop_reset(nop); 160 nop_reset(nop);
157 161