gpio: davinci: Remove redundant dev_err_probe()
authorRuan Jinjie <ruanjinjie@huawei.com>
Thu, 27 Jul 2023 11:57:26 +0000 (19:57 +0800)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Sat, 29 Jul 2023 13:58:32 +0000 (15:58 +0200)
There is no need to call the dev_err_probe() function directly to print
a custom message when handling an error from platform_get_irq() function as
it is going to display an appropriate error message in case of a failure.

Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/gpio-davinci.c

index fff510d..8db5717 100644 (file)
@@ -236,7 +236,7 @@ static int davinci_gpio_probe(struct platform_device *pdev)
        for (i = 0; i < nirq; i++) {
                chips->irqs[i] = platform_get_irq(pdev, i);
                if (chips->irqs[i] < 0)
-                       return dev_err_probe(dev, chips->irqs[i], "IRQ not populated\n");
+                       return chips->irqs[i];
        }
 
        chips->chip.label = dev_name(dev);