spi/spidev: Use PTR_RET function
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>
This commit is contained in:
parent
e4d43781df
commit
8179bb2655
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue