Skip to content

Commit

Permalink
[CPUFREQ] add error handling for cpufreq_register_governor() error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Akinobu Mita authored and Dave Jones committed Oct 9, 2008
1 parent 847aef6 commit 888a794
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/cpufreq/cpufreq_ondemand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 888a794

Please sign in to comment.