summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/adm1026.c
diff options
context:
space:
mode:
authorMark M. Hoffman <mhoffman@lightlink.com>2005-08-27 03:34:08 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2005-08-27 04:37:12 +0200
commitbebf4688e9dbbfdd421736685d607bced91a3c91 (patch)
treeb88e2d0d55bbc9788337c256dfd25b54d684e49e /drivers/hwmon/adm1026.c
parent[PATCH] ppc64: Fix issue with gcc 4.0 compiled kernels (diff)
downloadlinux-bebf4688e9dbbfdd421736685d607bced91a3c91.tar.xz
linux-bebf4688e9dbbfdd421736685d607bced91a3c91.zip
[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/adm1026.c')
-rw-r--r--drivers/hwmon/adm1026.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/adm1026.c b/drivers/hwmon/adm1026.c
index ded6e8adc854..c8a7f47911f9 100644
--- a/drivers/hwmon/adm1026.c
+++ b/drivers/hwmon/adm1026.c
@@ -325,7 +325,7 @@ int adm1026_attach_adapter(struct i2c_adapter *adapter)
int adm1026_detach_client(struct i2c_client *client)
{
i2c_detach_client(client);
- kfree(client);
+ kfree(i2c_get_clientdata(client));
return 0;
}