gpio: bcm-kona: 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> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
This commit is contained in:
parent
ddbc9712f3
commit
cff9d73f3d
@ -590,10 +590,7 @@ static int bcm_kona_gpio_probe(struct platform_device *pdev)
|
||||
dev_err(dev, "Couldn't determine # GPIO banks\n");
|
||||
return -ENOENT;
|
||||
} else if (ret < 0) {
|
||||
if (ret != -EPROBE_DEFER)
|
||||
dev_err(dev, "Couldn't determine GPIO banks: (%pe)\n",
|
||||
ERR_PTR(ret));
|
||||
return ret;
|
||||
return dev_err_probe(dev, ret, "Couldn't determine GPIO banks\n");
|
||||
}
|
||||
kona_gpio->num_bank = ret;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user