diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2012-08-04 16:00:31 +0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-09-17 17:03:37 +0400 |
commit | 8d2493781ad910019e9dc63dbf99f6dd2a8a2083 (patch) | |
tree | 120af87d23af22e6c9331ec25d5240f1e2d1deb8 /drivers/mfd/palmas.c | |
parent | a91d2f8d6e4c0fd3d6e1a2b5609eb93b114effb6 (diff) | |
download | linux-8d2493781ad910019e9dc63dbf99f6dd2a8a2083.tar.xz |
mfd: palmas: Drop kfree of devm_kzalloc's data
Using kfree to free data allocated with devm_kzalloc causes double frees.
The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression x;
@@
x = devm_kzalloc(...)
...
?-kfree(x);
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/palmas.c')
-rw-r--r-- | drivers/mfd/palmas.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/mfd/palmas.c b/drivers/mfd/palmas.c index a345f9bb7b47..e7a7415b8c2b 100644 --- a/drivers/mfd/palmas.c +++ b/drivers/mfd/palmas.c @@ -464,7 +464,6 @@ static int __devinit palmas_i2c_probe(struct i2c_client *i2c, err: mfd_remove_devices(palmas->dev); - kfree(palmas); return ret; } |