]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
[CPUFREQ] fix double freeing in error path of pcc-cpufreq
authorDaniel J Blueman <daniel.blueman@gmail.com>
Fri, 23 Jul 2010 22:06:52 +0000 (23:06 +0100)
committerDave Jones <davej@redhat.com>
Mon, 26 Jul 2010 19:25:34 +0000 (15:25 -0400)
Prevent double freeing on error path.

Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com>
Signed-off-by: Dave Jones <davej@redhat.com>
arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c

index 01bd25c3c7ca60d56facc9651126d9d282cc974a..900702888bfb9094f6b8fd7bd783b30e19525777 100644 (file)
@@ -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);