Skip to content

Commit

Permalink
max17042_battery: Remove obsolete cleanup for clientdata
Browse files Browse the repository at this point in the history
A few new i2c-drivers came into the kernel which clear the
clientdata-pointer on exit or error. This is obsolete meanwhile,
the core will do it.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
  • Loading branch information
Wolfram Sang authored and Anton Vorontsov committed Jul 8, 2011
1 parent 28d48f0 commit 7c4509b
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/power/max17042_battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ static int __devinit max17042_probe(struct i2c_client *client,
ret = power_supply_register(&client->dev, &chip->battery);
if (ret) {
dev_err(&client->dev, "failed: power supply register\n");
i2c_set_clientdata(client, NULL);
kfree(chip);
return ret;
}
Expand All @@ -202,7 +201,6 @@ static int __devexit max17042_remove(struct i2c_client *client)
struct max17042_chip *chip = i2c_get_clientdata(client);

power_supply_unregister(&chip->battery);
i2c_set_clientdata(client, NULL);
kfree(chip);
return 0;
}
Expand Down

0 comments on commit 7c4509b

Please sign in to comment.