aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/power/twl4030_charger.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/power/twl4030_charger.c b/drivers/power/twl4030_charger.c
index be98e70380f9..d98abe911e37 100644
--- a/drivers/power/twl4030_charger.c
+++ b/drivers/power/twl4030_charger.c
@@ -189,7 +189,12 @@ static int twl4030_charger_enable_usb(struct twl4030_bci *bci, bool enable)
189 189
190 /* Need to keep regulator on */ 190 /* Need to keep regulator on */
191 if (!bci->usb_enabled) { 191 if (!bci->usb_enabled) {
192 regulator_enable(bci->usb_reg); 192 ret = regulator_enable(bci->usb_reg);
193 if (ret) {
194 dev_err(bci->dev,
195 "Failed to enable regulator\n");
196 return ret;
197 }
193 bci->usb_enabled = 1; 198 bci->usb_enabled = 1;
194 } 199 }
195 200