]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI: properties: Fix __acpi_node_get_property_reference() return codes
authorSakari Ailus <sakari.ailus@linux.intel.com>
Wed, 11 Oct 2017 08:06:13 +0000 (11:06 +0300)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 11 Oct 2017 19:16:37 +0000 (21:16 +0200)
commit3ef7e14491b4f4ff350035c31528a3ef76c02135
treee70003f60ad317b651c2661f5d1eb7e0265412a3
parentea274703766ab8c08cb133c5178278741662cb5d
ACPI: properties: Fix __acpi_node_get_property_reference() return codes

Fix more return codes for device property: Align return codes of
__acpi_node_get_property_reference().

In particular, what was missed previously:

 -EPROTO could be returned in certain cases, now -EINVAL;
 -EINVAL was returned if the property was not found, now -ENOENT;
 -EINVAL was returned also if the index was higher than the number of
         entries in a package, now -ENOENT.

Reported-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
Fixes: 9dc988b1abd0 (device property: Introduce fwnode_property_get_reference_args)
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Tested-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/property.c