aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/c2port/core.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2012-03-05 17:59:15 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-05 18:49:43 -0500
commit22ea71d7f49c3115e3a9ced5eac109fef26d3559 (patch)
tree9977b74794a61ebf90377cb650e8217d6aa8df53 /drivers/misc/c2port/core.c
parent7ad12566dc02ca76e0056af58606b5ce0181460f (diff)
c2port: class_create() returns an ERR_PTR
class_create() doesn't return a NULL, it only returns ERR_PTRs. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/misc/c2port/core.c')
-rw-r--r--drivers/misc/c2port/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/c2port/core.c b/drivers/misc/c2port/core.c
index 19fc7c1cb428..f428d86bfc10 100644
--- a/drivers/misc/c2port/core.c
+++ b/drivers/misc/c2port/core.c
@@ -984,9 +984,9 @@ static int __init c2port_init(void)
984 " - (C) 2007 Rodolfo Giometti\n"); 984 " - (C) 2007 Rodolfo Giometti\n");
985 985
986 c2port_class = class_create(THIS_MODULE, "c2port"); 986 c2port_class = class_create(THIS_MODULE, "c2port");
987 if (!c2port_class) { 987 if (IS_ERR(c2port_class)) {
988 printk(KERN_ERR "c2port: failed to allocate class\n"); 988 printk(KERN_ERR "c2port: failed to allocate class\n");
989 return -ENOMEM; 989 return PTR_ERR(c2port_class);
990 } 990 }
991 c2port_class->dev_attrs = c2port_attrs; 991 c2port_class->dev_attrs = c2port_attrs;
992 992