From: Shaohua Li Date: Thu, 8 Apr 2010 03:16:15 +0000 (+0800) Subject: ACPI: fix acpi_hest_firmware_first_pci() caused oops X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4bdae98f1a456ea1fea5ea02f9249d23bceab75b;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git ACPI: fix acpi_hest_firmware_first_pci() caused oops acpi_hest_firmware_first_pci() could be called when acpi is disabled and cause system oops. Signed-off-by: Shaohua Li Signed-off-by: Len Brown --- diff --git a/drivers/acpi/hest.c b/drivers/acpi/hest.c index 4bb18c980ac6..1c527a192872 100644 --- a/drivers/acpi/hest.c +++ b/drivers/acpi/hest.c @@ -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)) {