summaryrefslogtreecommitdiffstats
path: root/drivers/pps
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2012-03-05 23:59:15 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-06 00:49:43 +0100
commit7ad12566dc02ca76e0056af58606b5ce0181460f (patch)
treef07dd27adb38a8fe266ea1ea144c8607a679583a /drivers/pps
parenthung_task: fix the broken rcu_lock_break() logic (diff)
downloadlinux-7ad12566dc02ca76e0056af58606b5ce0181460f.tar.xz
linux-7ad12566dc02ca76e0056af58606b5ce0181460f.zip
pps: class_create() returns an ERR_PTR, not NULL
class_create() never returns NULLs only ERR_PTRs. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: Rodolfo Giometti <giometti@enneenne.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/pps')
-rw-r--r--drivers/pps/pps.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pps/pps.c b/drivers/pps/pps.c
index 2baadd21b7a6..98fbe62694d4 100644
--- a/drivers/pps/pps.c
+++ b/drivers/pps/pps.c
@@ -369,9 +369,9 @@ static int __init pps_init(void)
int err;
pps_class = class_create(THIS_MODULE, "pps");
- if (!pps_class) {
+ if (IS_ERR(pps_class)) {
pr_err("failed to allocate class\n");
- return -ENOMEM;
+ return PTR_ERR(pps_class);
}
pps_class->dev_attrs = pps_attrs;