summaryrefslogtreecommitdiff
path: root/drivers/cpufreq/cpufreq_ondemand.c
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2008-07-14 07:00:45 +0400
committerDave Jones <davej@redhat.com>2008-10-09 21:52:43 +0400
commit888a794cacd8950ac6be701db20b62a4ab2ce90c (patch)
tree056e6cdbd70860dc226887727e632947b4992dd7 /drivers/cpufreq/cpufreq_ondemand.c
parent847aef6ffd85787b62395b64719f8f7c5975bf1b (diff)
downloadlinux-888a794cacd8950ac6be701db20b62a4ab2ce90c.tar.xz
[CPUFREQ] add error handling for cpufreq_register_governor() error
Add error handling for cpufreq_register_governor() error Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: cpufreq@lists.linux.org.uk Signed-off-by: Dave Jones <davej@redhat.com>
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);
static int __init cpufreq_gov_dbs_init(void)
{
+ int err;
+
kondemand_wq = create_workqueue("kondemand");
if (!kondemand_wq) {
printk(KERN_ERR "Creation of kondemand failed\n");
return -EFAULT;
}
- return cpufreq_register_governor(&cpufreq_gov_ondemand);
+ err = cpufreq_register_governor(&cpufreq_gov_ondemand);
+ if (err)
+ destroy_workqueue(kondemand_wq);
+
+ return err;
}
static void __exit cpufreq_gov_dbs_exit(void)