aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/chips
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2005-07-01 08:28:15 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-07-11 17:10:36 -0400
commit5da69ba42aa42a479c0f5d8cb8351ebb6b51c12e (patch)
tree3a0f32c3fbc961bb5f6b39c22c573fa8acd7c443 /drivers/i2c/chips
parent2146fec20c38d926f0d88413977f941f42a14588 (diff)
[PATCH] I2C: m41t00: fix incorrect kfree
Here is a simple path fixing an incorrect kfree in the m41t00 i2c chip driver. The current code happens to work by accident, but the freed pointer isn't the one which was allocated in the first place, which could cause problems later. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/i2c/chips')
-rw-r--r--drivers/i2c/chips/m41t00.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/chips/m41t00.c b/drivers/i2c/chips/m41t00.c
index 5e463c47bfbc..778d7e12859d 100644
--- a/drivers/i2c/chips/m41t00.c
+++ b/drivers/i2c/chips/m41t00.c
@@ -207,7 +207,7 @@ m41t00_detach(struct i2c_client *client)
207 int rc; 207 int rc;
208 208
209 if ((rc = i2c_detach_client(client)) == 0) { 209 if ((rc = i2c_detach_client(client)) == 0) {
210 kfree(i2c_get_clientdata(client)); 210 kfree(client);
211 tasklet_kill(&m41t00_tasklet); 211 tasklet_kill(&m41t00_tasklet);
212 } 212 }
213 return rc; 213 return rc;