]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
ACPI / property: Don't evaluate objects for devices w/o handle
authorLukas Wunner <lukas@wunner.de>
Tue, 1 Aug 2017 12:10:41 +0000 (14:10 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 3 Aug 2017 21:26:22 +0000 (23:26 +0200)
Fabricated devices such as LNXPWRBN lack a handle, causing evaluation
of _CCA and _DSD to always fail with AE_BAD_PARAMETER.  While that is
merely a (negligible) waste of processing power, evaluating a _DSM for
them (such as Apple's device properties _DSM which we're about to add)
results in an ugly error:

    ACPI: \: failed to evaluate _DSM (0x1001)

Avoid by not evaluating _DSD and the upcoming _DSM for devices without
handle.

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/property.c

index 917c789f953dfb280f6f00895ce1fcf7ae2484ec..116bfc1937b587098022492761dd2a8b971537c5 100644 (file)
@@ -339,6 +339,9 @@ void acpi_init_properties(struct acpi_device *adev)
 
        INIT_LIST_HEAD(&adev->data.subnodes);
 
+       if (!adev->handle)
+               return;
+
        /*
         * Check if ACPI_DT_NAMESPACE_HID is present and inthat case we fill in
         * Device Tree compatible properties for this device.