mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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 <[email protected]> Cc: MyungJoo Ham <[email protected]> Cc: Kyungmin Park <[email protected]> Acked-by: Jean Delvare <[email protected]> Signed-off-by: Anton Vorontsov <[email protected]>
This commit is contained in:
parent
28d48f04ea
commit
7c4509b4cd
1 changed files with 0 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue