diff options
author | Wolfram Sang <w.sang@pengutronix.de> | 2011-06-20 17:01:14 -0400 |
---|---|---|
committer | Anton Vorontsov <cbouatmailru@gmail.com> | 2011-07-08 08:58:15 -0400 |
commit | 7c4509b4cd1d99a1ea22ee4c1da4d3dbb9771c95 (patch) | |
tree | 44e133585fff3ad8461546932352e51d255fdd8e /drivers/power/max17042_battery.c | |
parent | 28d48f04ead41438f14d167fe61fd179de7029f3 (diff) |
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: 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>
Diffstat (limited to 'drivers/power/max17042_battery.c')
-rw-r--r-- | drivers/power/max17042_battery.c | 2 |
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 | } |