[PATCH] fix "ACPI: Processor native C-states using MWAIT"
authorDarrick J. Wong <djwong@us.ibm.com>
Fri, 20 Oct 2006 06:28:28 +0000 (23:28 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 20 Oct 2006 17:26:37 +0000 (10:26 -0700)
This patch breaks C-state discovery on my IBM IntelliStation Z30 because
the return value of acpi_processor_get_power_info_fadt is not assigned to
"result" in the case that acpi_processor_get_power_info_cst returns
-ENODEV.  Thus, if ACPI provides C-state data via the FADT and not _CST (as
is the case on this machine), we incorrectly exit the function with -ENODEV
after reading the FADT.  The attached patch sets the value of result so
that we don't exit early.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Acked-by: "Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>
Acked-by: "Brown, Len" <len.brown@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/acpi/processor_idle.c

index e67144cf3c8b91f865c9bdc2e64a441a875f6046..65b3f056ad895a7d0f524f7412ff861ce9298649 100644 (file)
@@ -962,7 +962,7 @@ static int acpi_processor_get_power_info(struct acpi_processor *pr)
 
        result = acpi_processor_get_power_info_cst(pr);
        if (result == -ENODEV)
-               acpi_processor_get_power_info_fadt(pr);
+               result = acpi_processor_get_power_info_fadt(pr);
 
        if (result)
                return result;