mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
ds2782_battery: Fix clientdata on removal
Probably due to a copy & paste bug, clientdata was set again to the data structure (which is freed immediately afterwards) when it should be NULLed. Just remove the calls as the i2c-core does this automatically now. Signed-off-by: Wolfram Sang <[email protected]> Cc: Ryan Mallon <[email protected]> Cc: Hans Verkuil <[email protected]> Cc: Jean Delvare <[email protected]> Signed-off-by: Anton Vorontsov <[email protected]>
This commit is contained in:
parent
db217dece3
commit
a009d29ea1
1 changed files with 0 additions and 3 deletions
|
|
@ -236,8 +236,6 @@ static int ds2782_battery_remove(struct i2c_client *client)
|
|||
idr_remove(&battery_id, info->id);
|
||||
mutex_unlock(&battery_lock);
|
||||
|
||||
i2c_set_clientdata(client, info);
|
||||
|
||||
kfree(info);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -289,7 +287,6 @@ static int ds2782_battery_probe(struct i2c_client *client,
|
|||
fail_register:
|
||||
kfree(info->battery.name);
|
||||
fail_name:
|
||||
i2c_set_clientdata(client, info);
|
||||
kfree(info);
|
||||
fail_info:
|
||||
mutex_lock(&battery_lock);
|
||||
|
|
|
|||
Loading…
Reference in a new issue