diff options
author | Wolfram Sang <w.sang@pengutronix.de> | 2010-04-01 12:27:44 +0200 |
---|---|---|
committer | Anton Vorontsov <cbouatmailru@gmail.com> | 2010-04-06 20:07:05 +0400 |
commit | a009d29ea104c1bd8805a20018469897c2c2263c (patch) | |
tree | 18b980bf8aecea51f057d7e8c3ab1ffae111213f /drivers/power/ds2782_battery.c | |
parent | db217dece3003df0841bacf9556b5c06aa097dae (diff) |
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 <w.sang@pengutronix.de>
Cc: Ryan Mallon <ryan@bluewatersys.com>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
Diffstat (limited to 'drivers/power/ds2782_battery.c')
-rw-r--r-- | drivers/power/ds2782_battery.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/power/ds2782_battery.c b/drivers/power/ds2782_battery.c index da14f374cb60..305d463a880c 100644 --- a/drivers/power/ds2782_battery.c +++ b/drivers/power/ds2782_battery.c @@ -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); |