diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2015-09-26 20:18:20 (GMT) |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2015-10-02 22:06:41 (GMT) |
commit | 7474f23dd05713dacc5f22d309913c96bce1c92b (patch) | |
tree | 9e01bf208ad01c752bfaa622ce107a6ca1491985 | |
parent | 450fa54cfd66e3dda6eda26256637ee8928af12a (diff) | |
download | linux-7474f23dd05713dacc5f22d309913c96bce1c92b.tar.xz |
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>
-rw-r--r-- | drivers/gpio/gpio-max730x.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-max730x.c b/drivers/gpio/gpio-max730x.c index 18ab89e..0f57d2d 100644 --- a/drivers/gpio/gpio-max730x.c +++ b/drivers/gpio/gpio-max730x.c @@ -236,7 +236,6 @@ int __max730x_remove(struct device *dev) ts->write(dev, 0x04, 0x00); gpiochip_remove(&ts->chip); mutex_destroy(&ts->lock); - kfree(ts); return 0; } EXPORT_SYMBOL_GPL(__max730x_remove); |