Explorar o código

drivers: char: Use PTR_RET function

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>
Alexandru Gheorghiu %!s(int64=13) %!d(string=hai) anos
pai
achega
275b5d2061
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      drivers/char/tile-srom.c

+ 1 - 1
drivers/char/tile-srom.c

@@ -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. */