diff options
author | Julia Lawall | 2013-01-06 21:46:23 +0100 |
---|---|---|
committer | Anton Vorontsov | 2013-01-06 21:46:23 +0100 |
commit | 0853699252afdeece69c9127d57fd367d3c04a35 (patch) | |
tree | 591115b3f18593cf52f358ac52960a6e48a50182 /arch/alpha/mm/extable.c | |
parent | ab8500_charger: Use devm_regulator_get API (diff) | |
download | kernel-qcow2-linux-0853699252afdeece69c9127d57fd367d3c04a35.tar.gz kernel-qcow2-linux-0853699252afdeece69c9127d57fd367d3c04a35.tar.xz kernel-qcow2-linux-0853699252afdeece69c9127d57fd367d3c04a35.zip |
88pm860x_battery: Eliminate possible references to released resources
devm_kzalloc should not be followed by kfree, as this results in a double
free. The problem was found using the following semantic match
(http://coccinelle.lip6.fr/):
// <smpl>
@@
expression x,e;
@@
x = devm_kzalloc(...)
... when != x = e
?-kfree(x,...);
// </smpl>
Furthermore, in the remove function, the calls to free_irq are moved up to
prevent a possible reference in the interrupt handler to resources freed by
power_supply_unregister.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
Diffstat (limited to 'arch/alpha/mm/extable.c')
0 files changed, 0 insertions, 0 deletions