spi: sh-hspi: Remove error messages on out-of-memory conditions

There is no need to print an error message when memory allocations or
related operations fail, as the core will take care of that.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Geert Uytterhoeven 2019-01-18 15:11:05 +01:00 committed by Mark Brown
parent f1b2c1c84f
commit 88e7e0a8df
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 1 additions and 4 deletions

View File

@ -226,10 +226,8 @@ static int hspi_probe(struct platform_device *pdev)
}
master = spi_alloc_master(&pdev->dev, sizeof(*hspi));
if (!master) {
dev_err(&pdev->dev, "spi_alloc_master error.\n");
if (!master)
return -ENOMEM;
}
clk = clk_get(&pdev->dev, NULL);
if (IS_ERR(clk)) {
@ -248,7 +246,6 @@ static int hspi_probe(struct platform_device *pdev)
hspi->addr = devm_ioremap(hspi->dev,
res->start, resource_size(res));
if (!hspi->addr) {
dev_err(&pdev->dev, "ioremap error.\n");
ret = -ENOMEM;
goto error1;
}