android_kernel_google_msm/drivers/gpio
Johan Hovold a610d5d4fb gpio: fix memory and reference leaks in gpiochip_add error path
commit 5539b3c938d64a60cb1fc442ac3ce9263d52de0c upstream.

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>
[lizf: Backported to 3.4:
 - move the call to of_gpiochip_add() into the above if condition.
 - remove the call to acpi_gpiochip_remove()]
Signed-off-by: Zefan Li <lizefan@huawei.com>
2015-04-14 17:33:52 +08:00
..
devres.c
gpio-74x164.c
gpio-ab8500.c
gpio-adp5520.c
gpio-adp5588.c
gpio-bt8xx.c
gpio-cs5535.c
gpio-da9052.c
gpio-davinci.c
gpio-ep93xx.c
gpio-ge.c
gpio-generic.c
gpio-it8761e.c
gpio-janz-ttl.c
gpio-ks8695.c
gpio-langwell.c
gpio-lpc32xx.c
gpio-max730x.c
gpio-max732x.c
gpio-max7300.c
gpio-max7301.c
gpio-mc9s08dz60.c
gpio-mc33880.c
gpio-mcp23s08.c
gpio-ml-ioh.c
gpio-mpc8xxx.c
gpio-mpc5200.c
gpio-msm-v1.c
gpio-msm-v2.c
gpio-mxc.c
gpio-mxs.c gpio: mxs: Allow for recursive enable_irq_wake() call 2014-05-13 14:11:31 +02:00
gpio-nomadik.c
gpio-omap.c
gpio-pca953x.c
gpio-pcf857x.c
gpio-pch.c
gpio-pl061.c
gpio-pxa.c
gpio-rdc321x.c
gpio-sa1100.c
gpio-samsung.c
gpio-sch.c
gpio-sodaville.c
gpio-stmpe.c
gpio-sx150x.c
gpio-tc3589x.c
gpio-tegra.c
gpio-timberdale.c
gpio-tnetv107x.c
gpio-tps65910.c
gpio-tps65912.c
gpio-twl4030.c
gpio-ucb1400.c
gpio-vr41xx.c
gpio-vx855.c
gpio-wm831x.c
gpio-wm8350.c
gpio-wm8994.c
gpio-xilinx.c
gpiolib.c gpio: fix memory and reference leaks in gpiochip_add error path 2015-04-14 17:33:52 +08:00
Kconfig
Makefile