From: Alexandre Courbot Date: Fri, 29 Jun 2012 04:57:58 +0000 (+0900) Subject: of: return -ENOENT when no property X-Git-Tag: next-20120724~35^2~2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1af4c7f18a442771d86d496c761e9816349f98c9;p=karo-tx-linux.git 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 Signed-off-by: Rob Herring --- 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 */