From 2b8e5e57e307004f4dd164bc4e327977c9727f28 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Wed, 14 May 2014 20:50:56 +0900 Subject: [PATCH] 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 Signed-off-by: MyungJoo Ham --- drivers/devfreq/devfreq.c | 4 ++-- 1 file 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; -- 2.7.4