aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/power/max17042_battery.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/power/max17042_battery.c b/drivers/power/max17042_battery.c
index c5c8805156cb..09f7496a6d8c 100644
--- a/drivers/power/max17042_battery.c
+++ b/drivers/power/max17042_battery.c
@@ -183,7 +183,6 @@ static int __devinit max17042_probe(struct i2c_client *client,
183 ret = power_supply_register(&client->dev, &chip->battery); 183 ret = power_supply_register(&client->dev, &chip->battery);
184 if (ret) { 184 if (ret) {
185 dev_err(&client->dev, "failed: power supply register\n"); 185 dev_err(&client->dev, "failed: power supply register\n");
186 i2c_set_clientdata(client, NULL);
187 kfree(chip); 186 kfree(chip);
188 return ret; 187 return ret;
189 } 188 }
@@ -202,7 +201,6 @@ static int __devexit max17042_remove(struct i2c_client *client)
202 struct max17042_chip *chip = i2c_get_clientdata(client); 201 struct max17042_chip *chip = i2c_get_clientdata(client);
203 202
204 power_supply_unregister(&chip->battery); 203 power_supply_unregister(&chip->battery);
205 i2c_set_clientdata(client, NULL);
206 kfree(chip); 204 kfree(chip);
207 return 0; 205 return 0;
208} 206}