diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2008-07-14 11:59:44 +0900 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2008-10-09 13:52:42 -0400 |
commit | 847aef6ffd85787b62395b64719f8f7c5975bf1b (patch) | |
tree | b0bbc10bd911ca6d6cfbe98ed1f691db4c40a8b1 /arch/x86/kernel/cpu/cpufreq | |
parent | 8d2d2051e50c4ca0207a42b243369e22f7d90a5c (diff) | |
download | op-kernel-dev-847aef6ffd85787b62395b64719f8f7c5975bf1b.zip op-kernel-dev-847aef6ffd85787b62395b64719f8f7c5975bf1b.tar.gz |
[CPUFREQ] acpi-cpufreq: add error handling for cpufreq_register_driver() error
add error handling for cpufreq_register_driver() 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 'arch/x86/kernel/cpu/cpufreq')
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c index dd097b8..1def5b0 100644 --- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c +++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c @@ -785,7 +785,11 @@ static int __init acpi_cpufreq_init(void) if (ret) return ret; - return cpufreq_register_driver(&acpi_cpufreq_driver); + ret = cpufreq_register_driver(&acpi_cpufreq_driver); + if (ret) + free_percpu(acpi_perf_data); + + return ret; } static void __exit acpi_cpufreq_exit(void) @@ -795,8 +799,6 @@ static void __exit acpi_cpufreq_exit(void) cpufreq_unregister_driver(&acpi_cpufreq_driver); free_percpu(acpi_perf_data); - - return; } module_param(acpi_pstate_strict, uint, 0644); |