mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
[CPUFREQ] add error handling for cpufreq_register_governor() error
Add error handling for cpufreq_register_governor() error Signed-off-by: Akinobu Mita <[email protected]> Cc: [email protected] Signed-off-by: Dave Jones <[email protected]>
This commit is contained in:
parent
847aef6ffd
commit
888a794cac
1 changed files with 7 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue