]> git.karo-electronics.de Git - linux-beck.git/commitdiff
gpio: removing kfree remove functionality
authorVarka Bhadram <varkabhadram@gmail.com>
Tue, 7 Apr 2015 16:04:40 +0000 (21:34 +0530)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 8 Apr 2015 14:54:01 +0000 (16:54 +0200)
commit 3de07e5aaf290a0b58919 ("drivers: gpio: use devm_kzalloc")
introduce devm_kzalloc() for allocating the memory. In this case kfree
is not required to use. Above commit id introduced the bug that kfree
is not removed from the remove function.

This patch fix the above bug.

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-adp5588.c
drivers/gpio/gpio-mcp23s08.c

index c90273dac289ebc4a904c25b15f35fd34a48d809..d3fe6a6776daaa8c43023daba09f3008187c471d 100644 (file)
@@ -471,7 +471,6 @@ static int adp5588_gpio_remove(struct i2c_client *client)
 
        gpiochip_remove(&dev->gpio_chip);
 
-       kfree(dev);
        return 0;
 }
 
index a17b81fea1612a9d4222ae23d7173930799257d9..2fc7ff852d1676d728e150d9a27e37e02403f72f 100644 (file)
@@ -1008,7 +1008,7 @@ static int mcp23s08_remove(struct spi_device *spi)
                        mcp23s08_irq_teardown(data->mcp[addr]);
                gpiochip_remove(&data->mcp[addr]->chip);
        }
-       kfree(data);
+
        return 0;
 }