Skip to content

Commit

Permalink
spi/spidev: 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 e4d4378 commit 8179bb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/spidev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8179bb2

Please sign in to comment.