PM / devfreq: create_freezable_workqueue() doesn't return an ERR_PTR
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 15 Aug 2013 07:55:10 +0000 (10:55 +0300)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Mon, 28 Oct 2013 11:18:30 +0000 (20:18 +0900)
The create_freezable_workqueue() function returns a NULL on error and
not an ERR_PTR.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
drivers/devfreq/devfreq.c

index c99c00d..22e5d2f 100644 (file)
@@ -993,10 +993,10 @@ static int __init devfreq_init(void)
        }
 
        devfreq_wq = create_freezable_workqueue("devfreq_wq");
-       if (IS_ERR(devfreq_wq)) {
+       if (!devfreq_wq) {
                class_destroy(devfreq_class);
                pr_err("%s: couldn't create workqueue\n", __FILE__);
-               return PTR_ERR(devfreq_wq);
+               return -ENOMEM;
        }
        devfreq_class->dev_groups = devfreq_groups;