summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/property.c
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2022-08-24 14:59:56 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-08-25 13:29:02 +0200
commit2ea3b19792dbe32287b0c48f3ff7e866f61967c7 (patch)
tree248e101f88b34f1969c1f7f491533d398db0e853 /drivers/acpi/property.c
parent06865077b34c792181e3c4f82417a2888c6e7453 (diff)
downloadlinux-stable-2ea3b19792dbe32287b0c48f3ff7e866f61967c7.tar.gz
linux-stable-2ea3b19792dbe32287b0c48f3ff7e866f61967c7.tar.bz2
linux-stable-2ea3b19792dbe32287b0c48f3ff7e866f61967c7.zip
ACPI: property: Ignore already existing data node tags
ACPI node pointers are attached to data node handles, in order to resolve string references to them. _DSD guide allows the same node to be reached from multiple parent nodes, leading the node enumeration algorithm to each such nodes more than once. As attached data already already exists, attaching data with the same tag will fail. Address this problem by ignoring nodes that have been already tagged. Fixes: 1d52f10917a7 ("ACPI: property: Tie data nodes to acpi handles") Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/property.c')
-rw-r--r--drivers/acpi/property.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/property.c b/drivers/acpi/property.c
index b1d4a8db89df..91d0e75859d3 100644
--- a/drivers/acpi/property.c
+++ b/drivers/acpi/property.c
@@ -370,7 +370,7 @@ static bool acpi_tie_nondev_subnodes(struct acpi_device_data *data)
bool ret;
status = acpi_attach_data(dn->handle, acpi_nondev_subnode_tag, dn);
- if (ACPI_FAILURE(status)) {
+ if (ACPI_FAILURE(status) && status != AE_ALREADY_EXISTS) {
acpi_handle_err(dn->handle, "Can't tag data node\n");
return false;
}