]> git.baikalelectronics.ru Git - kernel.git/commit
mfd: palmas: Drop kfree of devm_kzalloc's data
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sat, 4 Aug 2012 12:00:31 +0000 (14:00 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 17 Sep 2012 13:03:37 +0000 (15:03 +0200)
commitbe76f621a4665e775742a183f7014726b5f3ca8d
tree120af87d23af22e6c9331ec25d5240f1e2d1deb8
parente990ea1e5afb623b80d91533605660405c86d4f2
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>
drivers/mfd/palmas.c