diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2019-05-27 14:40:50 +0200 |
---|---|---|
committer | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2019-05-28 17:32:10 +0200 |
commit | 4c411ce35b866a351bca76b1d853eabdfa58998e (patch) | |
tree | 27d9c351891aabe4f38874252431ee144c695f10 /drivers/gpio/gpio-em.c | |
parent | ef9ace6f8008125e0f35ddd725ad07ca0de2f3e2 (diff) |
gpio: em: Remove error messages on out-of-memory conditions
There is no need to print error messages when memory allocations or
related operations fail, as the core will take care of that.
Change the returned error codes to -ENOMEM to match the failure cause
while at it.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Diffstat (limited to 'drivers/gpio/gpio-em.c')
-rw-r--r-- | drivers/gpio/gpio-em.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpio/gpio-em.c b/drivers/gpio/gpio-em.c index 982e699a5b81..18937a9b1a14 100644 --- a/drivers/gpio/gpio-em.c +++ b/drivers/gpio/gpio-em.c @@ -305,16 +305,14 @@ static int em_gio_probe(struct platform_device *pdev) p->base0 = devm_ioremap_nocache(&pdev->dev, io[0]->start, resource_size(io[0])); if (!p->base0) { - dev_err(&pdev->dev, "failed to remap low I/O memory\n"); - ret = -ENXIO; + ret = -ENOMEM; goto err0; } p->base1 = devm_ioremap_nocache(&pdev->dev, io[1]->start, resource_size(io[1])); if (!p->base1) { - dev_err(&pdev->dev, "failed to remap high I/O memory\n"); - ret = -ENXIO; + ret = -ENOMEM; goto err0; } |