Commit 7c4509b4 authored by Wolfram Sang's avatar Wolfram Sang Committed by Anton Vorontsov

max17042_battery: Remove obsolete cleanup for clientdata

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: default avatarWolfram Sang <w.sang@pengutronix.de>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: default avatarJean Delvare <khali@linux-fr.org>
Signed-off-by: default avatarAnton Vorontsov <cbouatmailru@gmail.com>
parent 28d48f04
...@@ -183,7 +183,6 @@ static int __devinit max17042_probe(struct i2c_client *client, ...@@ -183,7 +183,6 @@ static int __devinit max17042_probe(struct i2c_client *client,
ret = power_supply_register(&client->dev, &chip->battery); ret = power_supply_register(&client->dev, &chip->battery);
if (ret) { if (ret) {
dev_err(&client->dev, "failed: power supply register\n"); dev_err(&client->dev, "failed: power supply register\n");
i2c_set_clientdata(client, NULL);
kfree(chip); kfree(chip);
return ret; return ret;
} }
...@@ -202,7 +201,6 @@ static int __devexit max17042_remove(struct i2c_client *client) ...@@ -202,7 +201,6 @@ static int __devexit max17042_remove(struct i2c_client *client)
struct max17042_chip *chip = i2c_get_clientdata(client); struct max17042_chip *chip = i2c_get_clientdata(client);
power_supply_unregister(&chip->battery); power_supply_unregister(&chip->battery);
i2c_set_clientdata(client, NULL);
kfree(chip); kfree(chip);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment