Skip to content

Commit

Permalink
of: return -ENOENT when no property
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexandre Courbot authored and Rob Herring committed Jul 6, 2012
1 parent 5d78110 commit 1af4c7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/of/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 1af4c7f

Please sign in to comment.