Skip to content

Commit

Permalink
spi: sh-msiof: Remove useless memory allocation failure message
Browse files Browse the repository at this point in the history
Printing an error on memory allocation failure is unnecessary.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Geert Uytterhoeven authored and Mark Brown committed Jan 4, 2017
1 parent 264c3e8 commit e7ad4a7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/spi/spi-sh-msiof.c
Original file line number Diff line number Diff line change
Expand Up @@ -1164,10 +1164,8 @@ static int sh_msiof_spi_probe(struct platform_device *pdev)
int ret;

master = spi_alloc_master(&pdev->dev, sizeof(struct sh_msiof_spi_priv));
if (master == NULL) {
dev_err(&pdev->dev, "failed to allocate spi master\n");
if (master == NULL)
return -ENOMEM;
}

p = spi_master_get_devdata(master);

Expand Down

0 comments on commit e7ad4a7

Please sign in to comment.