Skip to content

Commit

Permalink
gpio: remember to finally free gpio_device
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Linus Walleij committed Feb 11, 2016
1 parent c366c76 commit 9efd9e6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpio/gpiolib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit 9efd9e6

Please sign in to comment.