aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power/lp8727_charger.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/power/lp8727_charger.c')
-rw-r--r--drivers/power/lp8727_charger.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/power/lp8727_charger.c b/drivers/power/lp8727_charger.c
index 2a649e07ddde..a7e5cc2b4d74 100644
--- a/drivers/power/lp8727_charger.c
+++ b/drivers/power/lp8727_charger.c
@@ -425,6 +425,9 @@ static int lp8727_probe(struct i2c_client *cl, const struct i2c_device_id *id)
425 struct lp8727_chg *pchg; 425 struct lp8727_chg *pchg;
426 int ret; 426 int ret;
427 427
428 if (!i2c_check_functionality(cl->adapter, I2C_FUNC_SMBUS_I2C_BLOCK))
429 return -EIO;
430
428 pchg = kzalloc(sizeof(*pchg), GFP_KERNEL); 431 pchg = kzalloc(sizeof(*pchg), GFP_KERNEL);
429 if (!pchg) 432 if (!pchg)
430 return -ENOMEM; 433 return -ENOMEM;