Subject: I2C: m41t00: fix incorrect kfree

From: Jean Delvare <[email-masked]>
Date: Fri, 1 Jul 2005 14:28:15 +0200

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 <[email-masked]>
Signed-off-by: Greg Kroah-Hartman <[email-masked]>

---
 drivers/i2c/chips/m41t00.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- gregkh-2.6.orig/drivers/i2c/chips/m41t00.c	2005-06-29 07:55:18.000000000 -0700
+++ gregkh-2.6/drivers/i2c/chips/m41t00.c	2005-07-01 14:44:09.000000000 -0700
@@ -207,7 +207,7 @@
 	int	rc;
 
 	if ((rc = i2c_detach_client(client)) == 0) {
-		kfree(i2c_get_clientdata(client));
+		kfree(client);
 		tasklet_kill(&m41t00_tasklet);
 	}
 	return rc;