Commit 888a794c authored by Akinobu Mita's avatar Akinobu Mita Committed by Dave Jones

[CPUFREQ] add error handling for cpufreq_register_governor() error

Add error handling for cpufreq_register_governor() error
Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Cc: cpufreq@lists.linux.org.uk
Signed-off-by: default avatarDave Jones <davej@redhat.com>
parent 847aef6f
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment