aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq_ondemand.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cpufreq/cpufreq_ondemand.c')
-rw-r--r--drivers/cpufreq/cpufreq_ondemand.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c
index 33855cb3cf16..67c9d4f9edc0 100644
--- a/drivers/cpufreq/cpufreq_ondemand.c
+++ b/drivers/cpufreq/cpufreq_ondemand.c
@@ -589,12 +589,18 @@ EXPORT_SYMBOL(cpufreq_gov_ondemand);
589 589
590static int __init cpufreq_gov_dbs_init(void) 590static int __init cpufreq_gov_dbs_init(void)
591{ 591{
592 int err;
593
592 kondemand_wq = create_workqueue("kondemand"); 594 kondemand_wq = create_workqueue("kondemand");
593 if (!kondemand_wq) { 595 if (!kondemand_wq) {
594 printk(KERN_ERR "Creation of kondemand failed\n"); 596 printk(KERN_ERR "Creation of kondemand failed\n");
595 return -EFAULT; 597 return -EFAULT;
596 } 598 }
597 return cpufreq_register_governor(&cpufreq_gov_ondemand); 599 err = cpufreq_register_governor(&cpufreq_gov_ondemand);
600 if (err)
601 destroy_workqueue(kondemand_wq);
602
603 return err;
598} 604}
599 605
600static void __exit cpufreq_gov_dbs_exit(void) 606static void __exit cpufreq_gov_dbs_exit(void)