Skip to content

Commit

Permalink
spi: rspi: 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 fafd679 commit ffcfae3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/spi/spi-rspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1227,10 +1227,8 @@ static int rspi_probe(struct platform_device *pdev)
const struct spi_ops *ops;

master = spi_alloc_master(&pdev->dev, sizeof(struct rspi_data));
if (master == NULL) {
dev_err(&pdev->dev, "spi_alloc_master error.\n");
if (master == NULL)
return -ENOMEM;
}

of_id = of_match_device(rspi_of_match, &pdev->dev);
if (of_id) {
Expand Down

0 comments on commit ffcfae3

Please sign in to comment.