aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/lp8727_charger.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/power/lp8727_charger.c b/drivers/power/lp8727_charger.c
index 880bb7b98233..2507b2bb9df2 100644
--- a/drivers/power/lp8727_charger.c
+++ b/drivers/power/lp8727_charger.c
@@ -305,9 +305,10 @@ static int lp8727_charger_get_property(struct power_supply *psy,
305{ 305{
306 struct lp8727_chg *pchg = dev_get_drvdata(psy->dev->parent); 306 struct lp8727_chg *pchg = dev_get_drvdata(psy->dev->parent);
307 307
308 if (psp == POWER_SUPPLY_PROP_ONLINE) 308 if (psp != POWER_SUPPLY_PROP_ONLINE)
309 val->intval = lp8727_is_charger_attached(psy->name, 309 return -EINVAL;
310 pchg->devid); 310
311 val->intval = lp8727_is_charger_attached(psy->name, pchg->devid);
311 312
312 return 0; 313 return 0;
313} 314}