diff options
author | Hermes Zhang <chenhuiz@axis.com> | 2023-12-29 09:36:57 +0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2023-12-28 23:44:55 -0800 |
commit | 0b670b54119902de75fcd20a50585cf7b573f801 (patch) | |
tree | bf0bdaf74da246ee89e7f58b4ccf3b954db14034 /drivers/input | |
parent | 435e84ec2009bf40625ee7ca1f8453d3b22edf75 (diff) | |
download | lwn-0b670b54119902de75fcd20a50585cf7b573f801.tar.gz lwn-0b670b54119902de75fcd20a50585cf7b573f801.zip |
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>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/keyboard/gpio_keys.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index 06c09b7addf8..9f3bcd41cf67 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c @@ -592,9 +592,9 @@ static int gpio_keys_setup_key(struct platform_device *pdev, irq = gpiod_to_irq(bdata->gpiod); if (irq < 0) { error = irq; - dev_err(dev, - "Unable to get irq number for GPIO %d, error %d\n", - button->gpio, error); + dev_err_probe(dev, error, + "Unable to get irq number for GPIO %d\n", + button->gpio); return error; } bdata->irq = irq; |