mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
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>
This commit is contained in:
parent
33b78b5f14
commit
4e7ed69685
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user