Commit 4724e974 authored by Nick Piggin's avatar Nick Piggin Committed by Linus Torvalds

[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).
parent 235fc023
......@@ -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) ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment