aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/adm1031.c
diff options
context:
space:
mode:
authorMark M. Hoffman <mhoffman@lightlink.com>2005-08-26 21:34:08 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-08-26 22:37:12 -0400
commitbebf4688e9dbbfdd421736685d607bced91a3c91 (patch)
treeb88e2d0d55bbc9788337c256dfd25b54d684e49e /drivers/hwmon/adm1031.c
parent32818c2eb6b83ea5065c89e0c3cf774abc4dc02b (diff)
[PATCH] I2C hwmon: kfree fixes
This patch fixes several instances of hwmon drivers kfree'ing the "wrong" pointer; the existing code works somewhat by accident. (akpm: plucked from Greg's queue based on lkml discussion. Finishes off the patch from Jon Corbet) Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/hwmon/adm1031.c')
-rw-r--r--drivers/hwmon/adm1031.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/adm1031.c b/drivers/hwmon/adm1031.c
index 4211c8b4601a..936250957270 100644
--- a/drivers/hwmon/adm1031.c
+++ b/drivers/hwmon/adm1031.c
@@ -845,7 +845,7 @@ static int adm1031_detach_client(struct i2c_client *client)
845 if ((ret = i2c_detach_client(client)) != 0) { 845 if ((ret = i2c_detach_client(client)) != 0) {
846 return ret; 846 return ret;
847 } 847 }
848 kfree(client); 848 kfree(i2c_get_clientdata(client));
849 return 0; 849 return 0;
850} 850}
851 851