提交 275b5d20 编写于 作者: A Alexandru Gheorghiu 提交者: Greg Kroah-Hartman

drivers: char: Use PTR_RET function

Used PTR_RET function instead of IS_ERR and PTR_ERR.
Patch found using coccinelle.
Signed-off-by: NAlexandru Gheorghiu <gheorghiuandru@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 2451a848
...@@ -371,7 +371,7 @@ static int srom_setup_minor(struct srom_dev *srom, int index) ...@@ -371,7 +371,7 @@ static int srom_setup_minor(struct srom_dev *srom, int index)
dev = device_create(srom_class, &platform_bus, dev = device_create(srom_class, &platform_bus,
MKDEV(srom_major, index), srom, "%d", index); 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. */ /** srom_init() - Initialize the driver's module. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册