From: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx> If for some reason we fail to set the voltage range for the VDDCX regulator when removing it's better to still disable and free the regulator as that avoids leaking a reference to it and is likely to ensure that it's turned off completely. Signed-off-by: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx> --- drivers/usb/otg/msm_otg.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/drivers/usb/otg/msm_otg.c b/drivers/usb/otg/msm_otg.c index db69b2a..b276f8f 100644 --- a/drivers/usb/otg/msm_otg.c +++ b/drivers/usb/otg/msm_otg.c @@ -93,11 +93,9 @@ static int msm_hsusb_init_vddcx(struct msm_otg *motg, int init) } else { ret = regulator_set_voltage(hsusb_vddcx, 0, USB_PHY_VDD_DIG_VOL_MAX); - if (ret) { + if (ret) dev_err(motg->otg.dev, "unable to set the voltage " "for hsusb vddcx\n"); - return ret; - } ret = regulator_disable(hsusb_vddcx); if (ret) dev_err(motg->otg.dev, "unable to disable hsusb vddcx\n"); -- 1.7.4.2 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html