Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[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>

authored by

Mark M. Hoffman and committed by
Linus Torvalds
bebf4688 32818c2e

+2 -2
+1 -1
drivers/hwmon/adm1026.c
··· 325 325 int adm1026_detach_client(struct i2c_client *client) 326 326 { 327 327 i2c_detach_client(client); 328 - kfree(client); 328 + kfree(i2c_get_clientdata(client)); 329 329 return 0; 330 330 } 331 331
+1 -1
drivers/hwmon/adm1031.c
··· 845 845 if ((ret = i2c_detach_client(client)) != 0) { 846 846 return ret; 847 847 } 848 - kfree(client); 848 + kfree(i2c_get_clientdata(client)); 849 849 return 0; 850 850 } 851 851