Commit ea7f4548c93aacbac5fe3e1b4eb273d3df5f16e3
Committed by
MyungJoo Ham
1 parent
9671dc7935
Exists in
master
and in
16 other branches
PM / devfreq: create_freezable_workqueue() doesn't return an ERR_PTR
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>
Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff
drivers/devfreq/devfreq.c
... | ... | @@ -993,10 +993,10 @@ |
993 | 993 | } |
994 | 994 | |
995 | 995 | devfreq_wq = create_freezable_workqueue("devfreq_wq"); |
996 | - if (IS_ERR(devfreq_wq)) { | |
996 | + if (!devfreq_wq) { | |
997 | 997 | class_destroy(devfreq_class); |
998 | 998 | pr_err("%s: couldn't create workqueue\n", __FILE__); |
999 | - return PTR_ERR(devfreq_wq); | |
999 | + return -ENOMEM; | |
1000 | 1000 | } |
1001 | 1001 | devfreq_class->dev_groups = devfreq_groups; |
1002 | 1002 |