summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2014-05-14 11:50:56 (GMT)
committerJonghwa Lee <jonghwa3.lee@samsung.com>2014-05-15 09:59:11 (GMT)
commit42da8cb46f0664455f7ac4361bc138d707f520f7 (patch)
tree9b917c4b31b86e1910e2364e82b28e7070e7c09a
parent68bb0609306c0638adb6d6afc15181afa2b00a46 (diff)
downloadlinux-3.10-42da8cb46f0664455f7ac4361bc138d707f520f7.zip
linux-3.10-42da8cb46f0664455f7ac4361bc138d707f520f7.tar.gz
linux-3.10-42da8cb46f0664455f7ac4361bc138d707f520f7.tar.bz2
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. Change-Id: If805c1068d00d3a2e6897c890475e35c780ef8c7 Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
-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 44c4079..250b22d 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -983,10 +983,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_attrs = devfreq_attrs;