pr_err("failed to init usb phy\n");
goto reset_err;
}
+
+ err = generic_phy_power_on(&priv->phy);
+ if (err) {
+ dev_err(dev, "failed to power on usb phy\n");
+ goto phy_power_err;
+ }
}
hccr = map_physmem(dev_read_addr(dev), 0x100, MAP_NOCACHE);
return 0;
phy_err:
+ if (generic_phy_valid(&priv->phy)) {
+ ret = generic_phy_power_off(&priv->phy);
+ if (ret)
+ dev_err(dev, "failed to power off usb phy\n");
+ }
+
+phy_power_err:
if (generic_phy_valid(&priv->phy)) {
ret = generic_phy_exit(&priv->phy);
if (ret)
return ret;
if (generic_phy_valid(&priv->phy)) {
+ ret = generic_phy_power_off(&priv->phy);
+ if (ret)
+ return ret;
+
ret = generic_phy_exit(&priv->phy);
if (ret)
return ret;