]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ACPI: property: Do not pass NULL handles to acpi_attach_data()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 15 Sep 2025 18:28:52 +0000 (20:28 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 16 Sep 2025 17:51:37 +0000 (19:51 +0200)
commitbaf60d5cb8bc6b85511c5df5f0ad7620bb66d23c
tree10bbe0d4991feddbc32078f8b3a7c991a4173369
parent737c3a09dcf69ba2814f3674947ccaec1861c985
ACPI: property: Do not pass NULL handles to acpi_attach_data()

In certain circumstances, the ACPI handle of a data-only node may be
NULL, in which case it does not make sense to attempt to attach that
node to an ACPI namespace object, so update the code to avoid attempts
to do so.

This prevents confusing and unuseful error messages from being printed.

Also document the fact that the ACPI handle of a data-only node may be
NULL and when that happens in a code comment.  In addition, make
acpi_add_nondev_subnodes() print a diagnostic message for each data-only
node with an unknown ACPI namespace scope.

Fixes: 1d52f10917a7 ("ACPI: property: Tie data nodes to acpi handles")
Cc: 6.0+ <stable@vger.kernel.org> # 6.0+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Tested-by: Sakari Ailus <sakari.ailus@linux.intel.com>
drivers/acpi/property.c