mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-16 22:39:48 +00:00
gpio: fix memory and reference leaks in gpiochip_add error path
commit5539b3c938upstream. Memory allocated and references taken by of_gpiochip_add and acpi_gpiochip_add were never released on errors in gpiochip_add (e.g. failure to find free gpio range). Fixes:391c970c0d("of/gpio: add default of_xlate function if device has a node pointer") Fixes:664e3e5ac6("gpio / ACPI: register to ACPI events automatically") Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
This commit is contained in:
parent
9086ea6d8d
commit
185419ab8d
1 changed files with 7 additions and 4 deletions
Loading…
Add table
Add a link
Reference in a new issue