From: Julia Lawall Date: Sun, 6 Jan 2013 20:46:23 +0000 (-0800) Subject: 88pm860x_battery: Eliminate possible references to released resources X-Git-Tag: v3.9-rc1~151^2~37 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0853699252afdeece69c9127d57fd367d3c04a35;p=pandora-kernel.git 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/): // @@ expression x,e; @@ x = devm_kzalloc(...) ... when != x = e ?-kfree(x,...); // 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 Signed-off-by: Anton Vorontsov --- Reading git-diff-tree failed