summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-xgene.c
diff options
context:
space:
mode:
authorBartosz Golaszewski <bgolaszewski@baylibre.com>2019-10-02 19:28:52 +0300
committerBartosz Golaszewski <bgolaszewski@baylibre.com>2019-10-09 19:19:42 +0300
commitcf62b4e44c49a0bdf363464168e3c9c6e1d8efe5 (patch)
treed5eda880e00c0ac18ef2f5e9435241069edb6c6d /drivers/gpio/gpio-xgene.c
parent5ede17d61592844c6d09eaba513f9de14920965c (diff)
downloadlinux-cf62b4e44c49a0bdf363464168e3c9c6e1d8efe5.tar.xz
gpio: xgene: remove redundant error message
There's no need to emit an error message on probe failure unless we're printing some meaningful info. Otherwise the core driver code will inform us about a probe error. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-xgene.c')
-rw-r--r--drivers/gpio/gpio-xgene.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/drivers/gpio/gpio-xgene.c b/drivers/gpio/gpio-xgene.c
index 2918363884de..900b38a7dba8 100644
--- a/drivers/gpio/gpio-xgene.c
+++ b/drivers/gpio/gpio-xgene.c
@@ -160,23 +160,17 @@ static int xgene_gpio_probe(struct platform_device *pdev)
int err = 0;
gpio = devm_kzalloc(&pdev->dev, sizeof(*gpio), GFP_KERNEL);
- if (!gpio) {
- err = -ENOMEM;
- goto err;
- }
+ if (!gpio)
+ return -ENOMEM;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res) {
- err = -EINVAL;
- goto err;
- }
+ if (!res)
+ return -EINVAL;
gpio->base = devm_ioremap_nocache(&pdev->dev, res->start,
resource_size(res));
- if (!gpio->base) {
- err = -ENOMEM;
- goto err;
- }
+ if (!gpio->base)
+ return -ENOMEM;
gpio->chip.ngpio = XGENE_MAX_GPIOS;
@@ -196,14 +190,11 @@ static int xgene_gpio_probe(struct platform_device *pdev)
if (err) {
dev_err(&pdev->dev,
"failed to register gpiochip.\n");
- goto err;
+ return err;
}
dev_info(&pdev->dev, "X-Gene GPIO driver registered.\n");
return 0;
-err:
- dev_err(&pdev->dev, "X-Gene GPIO driver registration failed.\n");
- return err;
}
static const struct of_device_id xgene_gpio_of_match[] = {