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

index 2e0655dbe07040a25eb2d3c6b79d05a3e647bf20..911e9e0711d2a040116e7e1f1bd6514a6fe4ad53 100644 (file)
@@ -603,7 +603,7 @@ static int spidev_probe(struct spi_device *spi)
                dev = device_create(spidev_class, &spi->dev, spidev->devt,
                                    spidev, "spidev%d.%d",
                                    spi->master->bus_num, spi->chip_select);
-               status = IS_ERR(dev) ? PTR_ERR(dev) : 0;
+               status = PTR_RET(dev);
        } else {
                dev_dbg(&spi->dev, "no minor number available!\n");
                status = -ENODEV;