|
@@ -571,10 +571,9 @@ static int acpi_data_get_property_array(const struct acpi_device_data *data,
|
|
|
* }
|
|
|
* }
|
|
|
*
|
|
|
- * Calling this function with index %2 return %-ENOENT and with index %3
|
|
|
- * returns the last entry. If the property does not contain any more values
|
|
|
- * %-ENODATA is returned. The NULL entry must be single integer and
|
|
|
- * preferably contain value %0.
|
|
|
+ * Calling this function with index %2 or index %3 return %-ENOENT. If the
|
|
|
+ * property does not contain any more values %-ENOENT is returned. The NULL
|
|
|
+ * entry must be single integer and preferably contain value %0.
|
|
|
*
|
|
|
* Return: %0 on success, negative error code on failure.
|
|
|
*/
|
|
@@ -590,7 +589,7 @@ int __acpi_node_get_property_reference(const struct fwnode_handle *fwnode,
|
|
|
|
|
|
data = acpi_device_data_of_node(fwnode);
|
|
|
if (!data)
|
|
|
- return -EINVAL;
|
|
|
+ return -ENOENT;
|
|
|
|
|
|
ret = acpi_data_get_property(data, propname, ACPI_TYPE_ANY, &obj);
|
|
|
if (ret)
|
|
@@ -635,7 +634,7 @@ int __acpi_node_get_property_reference(const struct fwnode_handle *fwnode,
|
|
|
ret = acpi_bus_get_device(element->reference.handle,
|
|
|
&device);
|
|
|
if (ret)
|
|
|
- return -ENODEV;
|
|
|
+ return -EINVAL;
|
|
|
|
|
|
nargs = 0;
|
|
|
element++;
|
|
@@ -649,11 +648,11 @@ int __acpi_node_get_property_reference(const struct fwnode_handle *fwnode,
|
|
|
else if (type == ACPI_TYPE_LOCAL_REFERENCE)
|
|
|
break;
|
|
|
else
|
|
|
- return -EPROTO;
|
|
|
+ return -EINVAL;
|
|
|
}
|
|
|
|
|
|
if (nargs > MAX_ACPI_REFERENCE_ARGS)
|
|
|
- return -EPROTO;
|
|
|
+ return -EINVAL;
|
|
|
|
|
|
if (idx == index) {
|
|
|
args->adev = device;
|
|
@@ -670,13 +669,13 @@ int __acpi_node_get_property_reference(const struct fwnode_handle *fwnode,
|
|
|
return -ENOENT;
|
|
|
element++;
|
|
|
} else {
|
|
|
- return -EPROTO;
|
|
|
+ return -EINVAL;
|
|
|
}
|
|
|
|
|
|
idx++;
|
|
|
}
|
|
|
|
|
|
- return -ENODATA;
|
|
|
+ return -ENOENT;
|
|
|
}
|
|
|
EXPORT_SYMBOL_GPL(__acpi_node_get_property_reference);
|
|
|
|