summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-omap.c
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzk@kernel.org>2020-08-27 22:08:24 +0200
committerBartosz Golaszewski <bgolaszewski@baylibre.com>2020-08-28 20:15:23 +0200
commit4e7ed69685a5aec9974ce37c9eff260a9f945861 (patch)
tree2d122cfeb03fafc5f58eb154fc03ceb5f1b89c98 /drivers/gpio/gpio-omap.c
parent33b78b5f14be088f7dd33e10311a932f1b009c14 (diff)
downloadlinux-4e7ed69685a5aec9974ce37c9eff260a9f945861.tar.gz
linux-4e7ed69685a5aec9974ce37c9eff260a9f945861.tar.bz2
linux-4e7ed69685a5aec9974ce37c9eff260a9f945861.zip
gpio: omap: Simplify with dev_err_probe()
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-by: Grygorii Strashko <grygorii.strashko@ti.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Diffstat (limited to 'drivers/gpio/gpio-omap.c')
-rw-r--r--drivers/gpio/gpio-omap.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index 7fbe0c9e1fc1..2dc12f4addbd 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1394,10 +1394,7 @@ static int omap_gpio_probe(struct platform_device *pdev)
if (bank->irq <= 0) {
if (!bank->irq)
bank->irq = -ENXIO;
- if (bank->irq != -EPROBE_DEFER)
- dev_err(dev,
- "can't get irq resource ret=%d\n", bank->irq);
- return bank->irq;
+ return dev_err_probe(dev, bank->irq, "can't get irq resource\n");
}
bank->chip.parent = dev;