diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2016-02-09 14:27:42 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-02-11 18:16:53 +0100 |
commit | 9efd9e6956adf479eb85beb74bb975f702dc01a9 (patch) | |
tree | 5005e8ec773716458ac14860acc1b38174dded9f /drivers/gpio/gpiolib.c | |
parent | c366c76a2c41d0c545e51b53056b21515db32e77 (diff) |
gpio: remember to finally free gpio_device
When the device core reference count for the device goes to
0 and it calls .release() we free resources and so can also
finally free up the GPIO state container, struct gpio_device.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpiolib.c')
-rw-r--r-- | drivers/gpio/gpiolib.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 70e0fff0a8a7..36f8be3f910b 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -405,6 +405,7 @@ static void gpiodevice_release(struct device *dev) cdev_del(&gdev->chrdev); list_del(&gdev->list); ida_simple_remove(&gpio_ida, gdev->id); + kfree(gdev); } /** |