]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: adnp: Fix segfault if request_threaded_irq fails
authorLars Poeschel <poeschel@lemonage.de>
Wed, 7 Aug 2013 15:23:58 +0000 (17:23 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 16 Aug 2013 14:53:16 +0000 (16:53 +0200)
commit268310b3a610ebcffad1c7ed79871ffa2f8bc3e9
tree1853196b83a54f67f123ece40daf76226695fdf8
parent6d5d049048cc495160a84f7b3e180fe71893c30d
gpio: adnp: Fix segfault if request_threaded_irq fails

In case request_threaded_irq inside adnp_irq_setup fails, the driver
segfaults. This is because irq_domain_remove is called twice with
the same pointer. First time in adnp_irq_setup and then a second time
after leaving adnp_irq_setup in the error path of adnp_i2c_probe
inside adnp_teardown.
This fixes this by removing the call to irq_domain_remove from
adnp_irq_setup.

Signed-off-by: Lars Poeschel <poeschel@lemonage.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-adnp.c