Skip to content

Commit 4bdae98

Browse files
Shaohua Lilenb
authored andcommitted
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 <shaohua.li@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
1 parent 97c227c commit 4bdae98

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/acpi/hest.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ int acpi_hest_firmware_first_pci(struct pci_dev *pci)
123123
{
124124
acpi_status status = AE_NOT_FOUND;
125125
struct acpi_table_header *hest = NULL;
126+
127+
if (acpi_disabled)
128+
return 0;
129+
126130
status = acpi_get_table(ACPI_SIG_HEST, 1, &hest);
127131

128132
if (ACPI_SUCCESS(status)) {

0 commit comments

Comments
 (0)