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 <[email protected]>
Signed-off-by: Rob Herring <[email protected]>
diff --git a/drivers/of/base.c b/drivers/of/base.c
index ddba577..8575795 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -902,7 +902,7 @@
/* 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 */