drivers: char: Use PTR_RET function
authorAlexandru Gheorghiu <gheorghiuandru@gmail.com>
Sat, 16 Mar 2013 14:19:51 +0000 (16:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Mar 2013 20:18:11 +0000 (13:18 -0700)
Used PTR_RET function instead of IS_ERR and PTR_ERR.
Patch found using coccinelle.

Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/tile-srom.c

index 3b22a606f79dc143abbece02b4893a71deee6e1b..2e2036e940fcafc2c52af4552da1cfd5d984d938 100644 (file)
@@ -371,7 +371,7 @@ static int srom_setup_minor(struct srom_dev *srom, int index)
 
        dev = device_create(srom_class, &platform_bus,
                            MKDEV(srom_major, index), srom, "%d", index);
-       return IS_ERR(dev) ? PTR_ERR(dev) : 0;
+       return PTR_RET(dev);
 }
 
 /** srom_init() - Initialize the driver's module. */