dect
/
linux-2.6
Archived
13
0
Fork 0

of: return -ENOENT when no property

Make of_parse_phandle_with_args return -ENOENT instead of -EINVAL when
no matching property is found, which allows to discriminate between
absence of property and parsing error.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
This commit is contained in:
Alexandre Courbot 2012-06-29 13:57:58 +09:00 committed by Rob Herring
parent 5d781108bc
commit 1af4c7f18a
1 changed files with 1 additions and 1 deletions

View File

@ -902,7 +902,7 @@ int of_parse_phandle_with_args(struct device_node *np, const char *list_name,
/* Retrieve the phandle list property */
list = of_get_property(np, list_name, &size);
if (!list)
return -EINVAL;
return -ENOENT;
list_end = list + size / sizeof(*list);
/* Loop over the phandles until all the requested entry is found */