diff options
author | Alexandre Courbot <acourbot@nvidia.com> | 2012-06-29 00:57:58 -0400 |
---|---|---|
committer | Rob Herring <rob.herring@calxeda.com> | 2012-07-06 08:16:34 -0400 |
commit | 1af4c7f18a442771d86d496c761e9816349f98c9 (patch) | |
tree | 752c3c19a8816527b208f3770cce0d84396097f1 /drivers/of/base.c | |
parent | 5d781108bc6524b92d6a6789e852b8a7e96aa3f3 (diff) |
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>
Diffstat (limited to 'drivers/of/base.c')
-rw-r--r-- | drivers/of/base.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c index ddba57799fd7..85757952f12d 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c | |||
@@ -902,7 +902,7 @@ int of_parse_phandle_with_args(struct device_node *np, const char *list_name, | |||
902 | /* Retrieve the phandle list property */ | 902 | /* Retrieve the phandle list property */ |
903 | list = of_get_property(np, list_name, &size); | 903 | list = of_get_property(np, list_name, &size); |
904 | if (!list) | 904 | if (!list) |
905 | return -EINVAL; | 905 | return -ENOENT; |
906 | list_end = list + size / sizeof(*list); | 906 | list_end = list + size / sizeof(*list); |
907 | 907 | ||
908 | /* Loop over the phandles until all the requested entry is found */ | 908 | /* Loop over the phandles until all the requested entry is found */ |