Skip to content

Commit 0b670b5

Browse files
Hermes Zhangdtor
authored andcommitted
Input: gpio-keys - filter gpio_keys -EPROBE_DEFER error messages
commit ae42f92 ("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>
1 parent 435e84e commit 0b670b5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/input/keyboard/gpio_keys.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -592,9 +592,9 @@ static int gpio_keys_setup_key(struct platform_device *pdev,
592592
irq = gpiod_to_irq(bdata->gpiod);
593593
if (irq < 0) {
594594
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);
598598
return error;
599599
}
600600
bdata->irq = irq;

0 commit comments

Comments
 (0)