aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDaniel J Blueman <daniel.blueman@gmail.com>2010-07-23 23:06:52 +0100
committerDave Jones <davej@redhat.com>2010-07-26 15:25:34 -0400
commit3847d223f2e4da5ceb47ea8996618010192f3197 (patch)
tree05e83cca56e1f887f4b59a76f4d63a1016644d8d /arch
parent47f8bcf362410b631a4d99ff5c79ec6b9dd3ace6 (diff)
downloadkernel_samsung_tuna-3847d223f2e4da5ceb47ea8996618010192f3197.zip
kernel_samsung_tuna-3847d223f2e4da5ceb47ea8996618010192f3197.tar.gz
kernel_samsung_tuna-3847d223f2e4da5ceb47ea8996618010192f3197.tar.bz2
[CPUFREQ] fix double freeing in error path of pcc-cpufreq
Prevent double freeing on error path. Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com> Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c
index 01bd25c..9007028 100644
--- a/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c
+++ b/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c
@@ -368,22 +368,16 @@ static int __init pcc_cpufreq_do_osc(acpi_handle *handle)
return -ENODEV;
out_obj = output.pointer;
- if (out_obj->type != ACPI_TYPE_BUFFER) {
- ret = -ENODEV;
- goto out_free;
- }
+ if (out_obj->type != ACPI_TYPE_BUFFER)
+ return -ENODEV;
errors = *((u32 *)out_obj->buffer.pointer) & ~(1 << 0);
- if (errors) {
- ret = -ENODEV;
- goto out_free;
- }
+ if (errors)
+ return -ENODEV;
supported = *((u32 *)(out_obj->buffer.pointer + 4));
- if (!(supported & 0x1)) {
- ret = -ENODEV;
- goto out_free;
- }
+ if (!(supported & 0x1))
+ return -ENODEV;
out_free:
kfree(output.pointer);