[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>
This commit is contained in:
committed by
Linus Torvalds
parent
32818c2eb6
commit
bebf4688e9
@@ -845,7 +845,7 @@ static int adm1031_detach_client(struct i2c_client *client)
|
||||
if ((ret = i2c_detach_client(client)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
kfree(client);
|
||||
kfree(i2c_get_clientdata(client));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user