public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] PM / devfreq: create_freezable_workqueue() doesn't return an ERR_PTR
@ 2013-08-15  7:55 Dan Carpenter
  2013-08-19  4:49 ` MyungJoo Ham
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2013-08-15  7:55 UTC (permalink / raw)
  To: MyungJoo Ham; +Cc: Kyungmin Park, linux-pm, linux-kernel, kernel-janitors

The create_freezable_workqueue() function returns a NULL on error and
not an ERR_PTR.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index e94e619..5088523 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;
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-08-19  4:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-15  7:55 [patch] PM / devfreq: create_freezable_workqueue() doesn't return an ERR_PTR Dan Carpenter
2013-08-19  4:49 ` MyungJoo Ham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox