Skip to content
Commit 9d552219 authored by Nikita Shubin's avatar Nikita Shubin Committed by Linus Walleij
Browse files

gpiolib: irq hooks: fix recursion in gpiochip_irq_unmask



irqchip shared with multiple gpiochips, leads to recursive call of
gpiochip_irq_mask/gpiochip_irq_unmask which was assigned to
rqchip->irq_mask/irqchip->irq_unmask, these happens becouse of
only irqchip->irq_enable == gpiochip_irq_enable is checked.

Let's add an additional check to make sure shared irqchip is detected
even if irqchip->irq_enable wasn't defined.

Fixes: a8173820 ("gpio: gpiolib: Allow GPIO IRQs to lazy disable")
Signed-off-by: default avatarNikita Shubin <nikita.shubin@maquefel.me>
Link: https://lore.kernel.org/r/20201210070514.13238-1-nikita.shubin@maquefel.me


Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent e6071cad
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment