summaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorLukas Wunner <lukas@wunner.de>2017-08-01 14:10:41 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-08-03 23:26:22 +0200
commit75fc70e07314347465c7df6d6b79535cf3db0e2a (patch)
tree1afe307c7371202febd3a69c1227d393e079dc26 /drivers/acpi
parent630b3aff8a51c90ef15b59c9560ac35e40e7ec09 (diff)
downloadop-kernel-dev-75fc70e07314347465c7df6d6b79535cf3db0e2a.zip
op-kernel-dev-75fc70e07314347465c7df6d6b79535cf3db0e2a.tar.gz
ACPI / property: Don't evaluate objects for devices w/o handle
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>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/property.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/acpi/property.c b/drivers/acpi/property.c
index 917c789..116bfc1 100644
--- a/drivers/acpi/property.c
+++ b/drivers/acpi/property.c
@@ -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.
OpenPOWER on IntegriCloud