diff options
author | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2019-07-11 10:29:35 +0200 |
---|---|---|
committer | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2019-07-15 11:52:42 +0200 |
commit | 19ec11a2233d24a7811836fa735203aaccf95a23 (patch) | |
tree | 7592b66de7d4b45caf883cc5937fac14a053ef57 /drivers/gpio/gpio-winbond.c | |
parent | gpiolib: of: fix a memory leak in of_gpio_flags_quirks() (diff) | |
download | linux-19ec11a2233d24a7811836fa735203aaccf95a23.tar.xz linux-19ec11a2233d24a7811836fa735203aaccf95a23.zip |
gpio: em: remove the gpiochip before removing the irq domain
In commit 8764c4ca5049 ("gpio: em: use the managed version of
gpiochip_add_data()") we implicitly altered the ordering of resource
freeing: since gpiochip_remove() calls gpiochip_irqchip_remove()
internally, we now can potentially use the irq_domain after it was
destroyed in the remove() callback (as devm resources are freed after
remove() has returned).
Use devm_add_action_or_reset() to keep the ordering right and entirely
kill the remove() callback in the driver.
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Fixes: 8764c4ca5049 ("gpio: em: use the managed version of gpiochip_add_data()")
Cc: stable@vger.kernel.org
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Diffstat (limited to 'drivers/gpio/gpio-winbond.c')
0 files changed, 0 insertions, 0 deletions