Skip to contentSkip to conversation

PM / devfreq: create_freezable_workqueue() doesn't return an ERR_PTR

PATCH In review Dan Carpenter 2 participants 2 messages Aug 15, 2013 – Aug 19, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

drivers/devfreq/devfreq.c +2 -2
index e94e619..5088523 100644
@@ -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;
 
maintainer
#1 lore raw
Quoted 5 lines · Dan Carpenter

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

Thanks. I'll apply this.

Quoted 19 lines
drivers/devfreq/devfreq.c +2 -3
index e94e619..5088523 100644
@@ -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;
 
--
Quoted 3 lines

To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
MyungJoo Ham, Ph.D.
System S/W Lab, S/W Center, Samsung Electronics