Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Input: gpio-keys - filter gpio_keys -EPROBE_DEFER error messages

commit ae42f9288846 ("gpio: Return EPROBE_DEFER if gc->to_irq is NULL")
make gpiod_to_irq() possible to return -EPROBE_DEFER when the racing
happens. This causes the following error message to be printed:

gpio-keys gpio_keys: Unable to get irq number for GPIO 0, error -517

Fix that by changing dev_err() to dev_err_probe()

Signed-off-by: Hermes Zhang <chenhuiz@axis.com>
Link: https://lore.kernel.org/r/20231229013657.692600-1-Hermes.Zhang@axis.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Hermes Zhang and committed by
Dmitry Torokhov
0b670b54 435e84ec

+3 -3
+3 -3
drivers/input/keyboard/gpio_keys.c
··· 592 592 irq = gpiod_to_irq(bdata->gpiod); 593 593 if (irq < 0) { 594 594 error = irq; 595 - dev_err(dev, 596 - "Unable to get irq number for GPIO %d, error %d\n", 597 - button->gpio, error); 595 + dev_err_probe(dev, error, 596 + "Unable to get irq number for GPIO %d\n", 597 + button->gpio); 598 598 return error; 599 599 } 600 600 bdata->irq = irq;