summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandre Courbot <acourbot@nvidia.com>2012-06-29 06:57:58 +0200
committerRob Herring <rob.herring@calxeda.com>2012-07-06 14:16:34 +0200
commit1af4c7f18a442771d86d496c761e9816349f98c9 (patch)
tree752c3c19a8816527b208f3770cce0d84396097f1
parentusage-model.txt: fix typo machine_init->init_machine (diff)
downloadlinux-1af4c7f18a442771d86d496c761e9816349f98c9.tar.xz
linux-1af4c7f18a442771d86d496c761e9816349f98c9.zip
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>
-rw-r--r--drivers/of/base.c2
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,
/* 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 */