spi/fsl: Use PTR_RET function
authorAlexandru Gheorghiu <gheorghiuandru@gmail.com>
Thu, 14 Mar 2013 09:07:31 +0000 (11:07 +0200)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 1 Apr 2013 13:32:13 +0000 (14:32 +0100)
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>
drivers/spi/spi-fsl-spi.c

index 086a9eef2e0568db1f7434f01f4f03a1e8d6b891..1985ba38032ec9e50f946ece00672aef690f3496 100644 (file)
@@ -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)