[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1363443591-22014-1-git-send-email-gheorghiuandru@gmail.com>
Date: Sat, 16 Mar 2013 16:19:51 +0200
From: Alexandru Gheorghiu <gheorghiuandru@...il.com>
To: Arnd Bergmann <arnd@...db.de>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org,
Alexandru Gheorghiu <gheorghiuandru@...il.com>
Subject: [PATCH] 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@...il.com>
---
drivers/char/tile-srom.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/char/tile-srom.c b/drivers/char/tile-srom.c
index 3b22a60..2e2036e 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. */
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists