mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 10:29:37 +00:00
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>
This commit is contained in:
parent
a91d2f8d6e
commit
8d2493781a
1 changed files with 0 additions and 1 deletions
|
@ -464,7 +464,6 @@ static int __devinit palmas_i2c_probe(struct i2c_client *i2c,
|
|||
|
||||
err:
|
||||
mfd_remove_devices(palmas->dev);
|
||||
kfree(palmas);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue