pinctrl: bcm2835: Remove gpiochip on error
authorPhil Elwell <phil@raspberrypi.org>
Mon, 6 Jan 2020 16:04:30 +0000 (16:04 +0000)
committerPhil Elwell <pelwell@users.noreply.github.com>
Mon, 6 Jan 2020 16:30:00 +0000 (16:30 +0000)
commit1baa00ef5960efe61396a2d6e521bd7854b8405b
treebddab364d7080688a16fb104a908266516b629bf
parent3fdcc814c54faaf4715ad0d12371c1eec61bf1dc
pinctrl: bcm2835: Remove gpiochip on error

A failure in gpiochip_irqchip_add leads to a leak of a gpiochip. Fix
the leak with the use of devm_gpiochip_add_data.

Fixes: 85ae9e512f43 ("pinctrl: bcm2835: switch to GPIOLIB_IRQCHIP")
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
drivers/pinctrl/bcm/pinctrl-bcm2835.c