Commit cf62b4e4 authored by Bartosz Golaszewski's avatar Bartosz Golaszewski

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: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 5ede17d6
...@@ -160,23 +160,17 @@ static int xgene_gpio_probe(struct platform_device *pdev) ...@@ -160,23 +160,17 @@ static int xgene_gpio_probe(struct platform_device *pdev)
int err = 0; int err = 0;
gpio = devm_kzalloc(&pdev->dev, sizeof(*gpio), GFP_KERNEL); gpio = devm_kzalloc(&pdev->dev, sizeof(*gpio), GFP_KERNEL);
if (!gpio) { if (!gpio)
err = -ENOMEM; return -ENOMEM;
goto err;
}
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) { if (!res)
err = -EINVAL; return -EINVAL;
goto err;
}
gpio->base = devm_ioremap_nocache(&pdev->dev, res->start, gpio->base = devm_ioremap_nocache(&pdev->dev, res->start,
resource_size(res)); resource_size(res));
if (!gpio->base) { if (!gpio->base)
err = -ENOMEM; return -ENOMEM;
goto err;
}
gpio->chip.ngpio = XGENE_MAX_GPIOS; gpio->chip.ngpio = XGENE_MAX_GPIOS;
...@@ -196,14 +190,11 @@ static int xgene_gpio_probe(struct platform_device *pdev) ...@@ -196,14 +190,11 @@ static int xgene_gpio_probe(struct platform_device *pdev)
if (err) { if (err) {
dev_err(&pdev->dev, dev_err(&pdev->dev,
"failed to register gpiochip.\n"); "failed to register gpiochip.\n");
goto err; return err;
} }
dev_info(&pdev->dev, "X-Gene GPIO driver registered.\n"); dev_info(&pdev->dev, "X-Gene GPIO driver registered.\n");
return 0; 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[] = { static const struct of_device_id xgene_gpio_of_match[] = {
......
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