ACPI: fix acpi_hest_firmware_first_pci() caused oops
authorShaohua Li <shaohua.li@intel.com>
Thu, 8 Apr 2010 03:16:15 +0000 (11:16 +0800)
committerLen Brown <len.brown@intel.com>
Thu, 6 May 2010 06:39:06 +0000 (02:39 -0400)
acpi_hest_firmware_first_pci() could be called when acpi is disabled
and cause system oops.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/hest.c

index 4bb18c980ac6ec938408b46ee220108eff496985..1c527a19287276d5effcfda7f6ab62a020a5a44d 100644 (file)
@@ -123,6 +123,10 @@ int acpi_hest_firmware_first_pci(struct pci_dev *pci)
 {
        acpi_status status = AE_NOT_FOUND;
        struct acpi_table_header *hest = NULL;
+
+       if (acpi_disabled)
+               return 0;
+
        status = acpi_get_table(ACPI_SIG_HEST, 1, &hest);
 
        if (ACPI_SUCCESS(status)) {