projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a91d2f8
)
mfd: palmas: Drop kfree of devm_kzalloc's data
author
Julia Lawall
<Julia.Lawall@lip6.fr>
Sat, 4 Aug 2012 12:00:31 +0000
(14:00 +0200)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Mon, 17 Sep 2012 13:03:37 +0000
(15:03 +0200)
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>
drivers/mfd/palmas.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/mfd/palmas.c
b/drivers/mfd/palmas.c
index a345f9bb7b4758765725cf2c056303950ecc1c02..e7a7415b8c2b90998fac7867172877182980f3ff 100644
(file)
--- 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;
}