[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 12 Dec 2012 01:24:52 +0100
From: Cyril Roelandt <tipecaml@...il.com>
To: linux-kernel@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org,
Cyril Roelandt <tipecaml@...il.com>,
paul.gortmaker@...driver.com, gregkh@...e.de
Subject: [PATCH 3/5] c2port: fix return value check in duramar2150_c2port_init().
The c2port_device_register() function returns ERR_PTR() and never returns NULL,
so the NULL check should be replaced by a call to IS_ERR().
Signed-off-by: Cyril Roelandt <tipecaml@...il.com>
---
drivers/misc/c2port/c2port-duramar2150.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/c2port/c2port-duramar2150.c b/drivers/misc/c2port/c2port-duramar2150.c
index 5484301..2742e60 100644
--- a/drivers/misc/c2port/c2port-duramar2150.c
+++ b/drivers/misc/c2port/c2port-duramar2150.c
@@ -129,7 +129,7 @@ static int __init duramar2150_c2port_init(void)
duramar2150_c2port_dev = c2port_device_register("uc",
&duramar2150_c2port_ops, NULL);
- if (!duramar2150_c2port_dev) {
+ if (IS_ERR(duramar2150_c2port_dev)) {
ret = -ENODEV;
goto free_region;
}
--
1.7.10.4
--
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