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>
This commit is contained in:
Родитель
ef9ace6f80
Коммит
4c411ce35b
|
@ -305,16 +305,14 @@ static int em_gio_probe(struct platform_device *pdev)
|
||||||
p->base0 = devm_ioremap_nocache(&pdev->dev, io[0]->start,
|
p->base0 = devm_ioremap_nocache(&pdev->dev, io[0]->start,
|
||||||
resource_size(io[0]));
|
resource_size(io[0]));
|
||||||
if (!p->base0) {
|
if (!p->base0) {
|
||||||
dev_err(&pdev->dev, "failed to remap low I/O memory\n");
|
ret = -ENOMEM;
|
||||||
ret = -ENXIO;
|
|
||||||
goto err0;
|
goto err0;
|
||||||
}
|
}
|
||||||
|
|
||||||
p->base1 = devm_ioremap_nocache(&pdev->dev, io[1]->start,
|
p->base1 = devm_ioremap_nocache(&pdev->dev, io[1]->start,
|
||||||
resource_size(io[1]));
|
resource_size(io[1]));
|
||||||
if (!p->base1) {
|
if (!p->base1) {
|
||||||
dev_err(&pdev->dev, "failed to remap high I/O memory\n");
|
ret = -ENOMEM;
|
||||||
ret = -ENXIO;
|
|
||||||
goto err0;
|
goto err0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче