Skip to content

Commit

Permalink
PM / devfreq: create_freezable_workqueue() doesn't return an ERR_PTR
Browse files Browse the repository at this point in the history
The create_freezable_workqueue() function returns a NULL on error and
not an ERR_PTR.

Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: MyungJoo Ham <[email protected]>
  • Loading branch information
Dan Carpenter authored and myungjoo committed Oct 28, 2013
1 parent 9671dc7 commit ea7f454
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/devfreq/devfreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit ea7f454

Please sign in to comment.