提交 ea7f4548 编写于 作者: D Dan Carpenter 提交者: MyungJoo Ham

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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
上级 9671dc79
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册