summaryrefslogtreecommitdiffstats
path: root/drivers/devfreq
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-08-15 10:55:10 +0300
committerMyungJoo Ham <myungjoo.ham@samsung.com>2013-10-28 20:18:30 +0900
commitea7f4548c93aacbac5fe3e1b4eb273d3df5f16e3 (patch)
treefcbcd88bf24dd310bf55543c3bd3814bf3867664 /drivers/devfreq
parent9671dc7935722a911262cade5c594315540628f2 (diff)
downloadop-kernel-dev-ea7f4548c93aacbac5fe3e1b4eb273d3df5f16e3.zip
op-kernel-dev-ea7f4548c93aacbac5fe3e1b4eb273d3df5f16e3.tar.gz
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>
Diffstat (limited to 'drivers/devfreq')
-rw-r--r--drivers/devfreq/devfreq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index c99c00d..22e5d2f 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -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;
OpenPOWER on IntegriCloud