]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI: properties: Consistently return -ENOENT if there are no more references
authorSakari Ailus <sakari.ailus@linux.intel.com>
Fri, 14 Jan 2022 11:24:49 +0000 (13:24 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 25 Jan 2022 17:49:00 +0000 (18:49 +0100)
commitc40fded33b90ad1b593d46aa5eba2395498af875
treee2c293e0cdb2cfeebc95c35ff190e27223637e94
parent991a5e519c2aa1f4ed2bf6e2139997d7e7967cb3
ACPI: properties: Consistently return -ENOENT if there are no more references

__acpi_node_get_property_reference() is documented to return -ENOENT if
the caller requests a property reference at an index that does not exist,
not -EINVAL which it actually does.

Fix this by returning -ENOENT consistenly, independently of whether the
property value is a plain reference or a package.

Fixes: ea274703766a ("ACPI: properties: Align return codes of __acpi_node_get_property_reference()")
Cc: 4.14+ <stable@vger.kernel.org> # 4.14+
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/property.c