From: Rafael J. Wysocki Date: Fri, 24 Oct 2008 19:50:31 +0000 (+0200) Subject: ACPI: Oops in ACPI with git latest X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f8123381bae8d581d81f24b55719db3d9a6a262c;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git ACPI: Oops in ACPI with git latest ACPI Warning (nseval-0168): Insufficient arguments - method [_OSC] needs 5, found 4 [20080926] ACPI Warning (nspredef-0252): \_SB_.PCI0._OSC: Parameter count mismatch - ASL declared 5, expected 4 [20080926] ACPI Error (nspredef-0163): \_SB_.PCI0._OSC: Missing expected return value [20080926] BUG: unable to handle kernel NULL pointer dereference at 00000000 IP: [] acpi_run_osc+0xa1/0x170 Signed-off-by: Rafael J. Wysocki Tested-by: James Bottomley Signed-off-by: Len Brown --- diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c index dfe7c8e1b185..b3a63edb6901 100644 --- a/drivers/pci/pci-acpi.c +++ b/drivers/pci/pci-acpi.c @@ -83,6 +83,9 @@ static acpi_status acpi_run_osc(acpi_handle handle, if (ACPI_FAILURE(status)) return status; + if (!output.length) + return AE_NULL_OBJECT; + out_obj = output.pointer; if (out_obj->type != ACPI_TYPE_BUFFER) { printk(KERN_DEBUG "Evaluate _OSC returns wrong type\n");