Commit 4e7ed696 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Bartosz Golaszewski

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: default avatarKrzysztof Kozlowski <krzk@kernel.org>
Acked-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
parent 33b78b5f
...@@ -1394,10 +1394,7 @@ static int omap_gpio_probe(struct platform_device *pdev) ...@@ -1394,10 +1394,7 @@ static int omap_gpio_probe(struct platform_device *pdev)
if (bank->irq <= 0) { if (bank->irq <= 0) {
if (!bank->irq) if (!bank->irq)
bank->irq = -ENXIO; bank->irq = -ENXIO;
if (bank->irq != -EPROBE_DEFER) return dev_err_probe(dev, bank->irq, "can't get irq resource\n");
dev_err(dev,
"can't get irq resource ret=%d\n", bank->irq);
return bank->irq;
} }
bank->chip.parent = dev; bank->chip.parent = dev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment