diff options
author | Krzysztof Kozlowski | 2020-08-27 22:08:22 +0200 |
---|---|---|
committer | Bartosz Golaszewski | 2020-08-28 20:13:51 +0200 |
commit | cff9d73f3d6a9f7ac41351c93b2969b7d3695821 (patch) | |
tree | 6f8ee49586fc9e527828e34c8e2cc83242c6dcff /drivers/gpio/gpio-bcm-kona.c | |
parent | ddbc9712f3ac5613225fd888d96a44d62f24463b (diff) |
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>
Diffstat (limited to 'drivers/gpio/gpio-bcm-kona.c')
-rw-r--r-- | drivers/gpio/gpio-bcm-kona.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpio/gpio-bcm-kona.c b/drivers/gpio/gpio-bcm-kona.c index cf3687a7925f..1e6b427f2c4a 100644 --- a/drivers/gpio/gpio-bcm-kona.c +++ b/drivers/gpio/gpio-bcm-kona.c @@ -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; |