gpio: max730x: eliminate double free
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sat, 26 Sep 2015 20:18:20 +0000 (22:18 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 2 Oct 2015 22:06:41 +0000 (15:06 -0700)
commit7474f23dd05713dacc5f22d309913c96bce1c92b
tree9e01bf208ad01c752bfaa622ce107a6ca1491985
parent450fa54cfd66e3dda6eda26256637ee8928af12a
gpio: max730x: eliminate double free

The function __max730x_remove is called from the remove functions of
drivers/gpio/gpio-max7300.c and drivers/gpio/gpio-max7301.c.  In both
cases, the probe function allocates ts using devm_kzalloc.  Explicitly
freeing such a value with kfree will cause a double free.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-max730x.c