Skip to content

Commit

Permalink
spi/fsl: Use PTR_RET function
Browse files Browse the repository at this point in the history
Replaced calls to IS_ERR and PTR_ERR with PTR_RET function.
Patch found using coccinelle.

Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Alexandru Gheorghiu authored and Mark Brown committed Apr 1, 2013
1 parent 6ada511 commit e4d4378
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/spi/spi-fsl-spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1134,9 +1134,7 @@ static int plat_mpc8xxx_spi_probe(struct platform_device *pdev)
return -EINVAL;

master = fsl_spi_probe(&pdev->dev, mem, irq);
if (IS_ERR(master))
return PTR_ERR(master);
return 0;
return PTR_RET(master);
}

static int plat_mpc8xxx_spi_remove(struct platform_device *pdev)
Expand Down

0 comments on commit e4d4378

Please sign in to comment.