diff --git a/drivers/power/bq27x00_battery.c b/drivers/power/bq27x00_battery.c index 181ddece5181..5860d4dfbe9c 100644 --- a/drivers/power/bq27x00_battery.c +++ b/drivers/power/bq27x00_battery.c @@ -814,7 +814,8 @@ static int bq27x00_battery_probe(struct i2c_client *client, di->bat.name = name; di->bus.read = &bq27x00_read_i2c; - if (bq27x00_powersupply_init(di)) + retval = bq27x00_powersupply_init(di); + if (retval) goto batt_failed_3; i2c_set_clientdata(client, di);