Check whether GPIO IRQ is enabled before proceeding with handling the interrupt request. The interrupt handler now returns IRQ_NONE if none of interrupts were handled, which is usually a sign of a problem. Signed-off-by: Dmitry Osipenko <digetx@xxxxxxxxx> --- drivers/gpio/gpio-max77620.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-max77620.c b/drivers/gpio/gpio-max77620.c index dd83c16a1ec6..8d54bc4307c2 100644 --- a/drivers/gpio/gpio-max77620.c +++ b/drivers/gpio/gpio-max77620.c @@ -37,7 +37,9 @@ static irqreturn_t max77620_gpio_irqhandler(int irq, void *data) return IRQ_NONE; } - pending = value; + pending = value & gpio->irq_enb_mask; + if (!pending) + return IRQ_NONE; for_each_set_bit(offset, &pending, MAX77620_GPIO_NR) { unsigned int virq; -- 2.26.0