summaryrefslogtreecommitdiff
path: root/drivers/power/supply/twl4030_charger.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/power/supply/twl4030_charger.c')
-rw-r--r--drivers/power/supply/twl4030_charger.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/power/supply/twl4030_charger.c b/drivers/power/supply/twl4030_charger.c
index 0e202d4273fb..4299873a1118 100644
--- a/drivers/power/supply/twl4030_charger.c
+++ b/drivers/power/supply/twl4030_charger.c
@@ -809,7 +809,9 @@ static int twl4030_bci_get_property(struct power_supply *psy,
is_charging = state & TWL4030_MSTATEC_AC;
if (!is_charging) {
u8 s;
- twl4030_bci_read(TWL4030_BCIMDEN, &s);
+ ret = twl4030_bci_read(TWL4030_BCIMDEN, &s);
+ if (ret < 0)
+ return ret;
if (psy->desc->type == POWER_SUPPLY_TYPE_USB)
is_charging = s & 1;
else