From: Alexandru Gheorghiu Date: Sat, 16 Mar 2013 14:19:51 +0000 (+0200) Subject: drivers: char: Use PTR_RET function X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=275b5d2061c20749582060be68b6ec4692736d28;p=linux-beck.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/char/tile-srom.c b/drivers/char/tile-srom.c index 3b22a606f79d..2e2036e940fc 100644 --- a/drivers/char/tile-srom.c +++ b/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. */