From 4724e9740897591423510ecdf9a37489988fe63e Mon Sep 17 00:00:00 2001 From: Nick Piggin Date: Sun, 10 Oct 2004 18:26:06 -0700 Subject: [PATCH] [PATCH] ACPI: check parameter for NULL ACPI still explodes on my old PII and stops it booting. Anyway, it is oopsing in drivers/acpi/scan.c line 207 where element (which is NULL) gets dereferenced. The ACPI bios on this thing has always seemed to be pretty broken, but this at least allows the 'power' button to continue to work (the only reason why I want ACPI). --- drivers/acpi/scan.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index c6916462b3c0a..4e46eeddf19c4 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -204,6 +204,8 @@ acpi_bus_extract_wakeup_device_power_package ( return AE_BAD_PARAMETER; element = &(package->package.elements[0]); + if (!element) + return AE_BAD_PARAMETER; if (element->type == ACPI_TYPE_PACKAGE) { if ((element->package.count < 2) || (element->package.elements[0].type != ACPI_TYPE_LOCAL_REFERENCE) || -- 2.53.0