pinctrl: stm32: fix optional IRQ support to gpios
authorFabien Dessenne <fabien.dessenne@foss.st.com>
Mon, 27 Jun 2022 14:23:50 +0000 (16:23 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 28 Jun 2022 14:12:40 +0000 (16:12 +0200)
commita1d4ef1adf8bbd302067534ead671a94759687ed
treeafaeacd168f873eb84105ca52f3888f35b7ca4f9
parentfbc24ebc65507feb9728dc38197f90486148dda0
pinctrl: stm32: fix optional IRQ support to gpios

To act as an interrupt controller, a gpio bank relies on the
"interrupt-parent" of the pin controller.
When this optional "interrupt-parent" misses, do not create any IRQ domain.

This fixes a "NULL pointer in stm32_gpio_domain_alloc()" kernel crash when
the interrupt-parent = <exti> property is not declared in the Device Tree.

Fixes: 0eb9f683336d ("pinctrl: Add IRQ support to STM32 gpios")
Signed-off-by: Fabien Dessenne <fabien.dessenne@foss.st.com>
Link: https://lore.kernel.org/r/20220627142350.742973-1-fabien.dessenne@foss.st.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/stm32/pinctrl-stm32.c