ACPI: processor: Fix null pointer dereference in throttling
authorAlexey Starikovskiy <astarikovskiy@suse.de>
Tue, 15 Jan 2008 05:47:47 +0000 (00:47 -0500)
committerLen Brown <len.brown@intel.com>
Tue, 15 Jan 2008 05:47:47 +0000 (00:47 -0500)
http://bugzilla.kernel.org/show_bug.cgi?id=9747

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/processor_throttling.c

index 6742d7bc4777d8343d10aa34aa5d40a920f5f41a..1685b40abda7c2dba944939917a4993f8a4a5f3d 100644 (file)
@@ -775,12 +775,12 @@ int acpi_processor_get_throttling_info(struct acpi_processor *pr)
                acpi_processor_get_throttling_states(pr) ||
                acpi_processor_get_platform_limit(pr))
        {
-               if (acpi_processor_get_fadt_info(pr))
-                       return 0;
                pr->throttling.acpi_processor_get_throttling =
                    &acpi_processor_get_throttling_fadt;
                pr->throttling.acpi_processor_set_throttling =
                    &acpi_processor_set_throttling_fadt;
+               if (acpi_processor_get_fadt_info(pr))
+                       return 0;
        } else {
                pr->throttling.acpi_processor_get_throttling =
                    &acpi_processor_get_throttling_ptc;