[PATCH] Input: gpio-keys - do not BUG() on requested wakeirqs

From: Andreas Kemnade

Date: Wed Nov 04 2026 - 11:08:55 EST


Having the IRQ handler called when enabled IRQs arrive should be considered
as a feature not as a bug. So do not BUG() there when this happens.

Fixes: 3717194f24922 ("Input: gpio-keys - add system suspend support for dedicated wakeirqs")
Signed-off-by: Andreas Kemnade <andreas@xxxxxxxxxxxx>
---
drivers/input/keyboard/gpio_keys.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
index fbc31c5db3db..f1c31c5366f0 100644
--- a/drivers/input/keyboard/gpio_keys.c
+++ b/drivers/input/keyboard/gpio_keys.c
@@ -412,7 +412,7 @@ static irqreturn_t gpio_keys_gpio_isr(int irq, void *dev_id)
{
struct gpio_button_data *bdata = dev_id;

- BUG_ON(irq != bdata->irq);
+ BUG_ON((irq != bdata->irq) && (irq != bdata->wakeirq));

if (bdata->button->wakeup) {
const struct gpio_keys_button *button = bdata->button;
--
2.47.3