[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1340945879-11712-2-git-send-email-acourbot@nvidia.com>
Date: Fri, 29 Jun 2012 13:57:58 +0900
From: Alexandre Courbot <acourbot@...dia.com>
To: Rob Herring <rob.herring@...xeda.com>,
Grant Likely <grant.likely@...retlab.ca>,
Linus Walleij <linus.walleij@...ricsson.com>
CC: <linux-kernel@...r.kernel.org>,
<devicetree-discuss@...ts.ozlabs.org>,
Alexandre Courbot <acourbot@...dia.com>
Subject: [PATCH 1/2] 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@...dia.com>
---
drivers/of/base.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 7acd785..93165b7a 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 */
--
1.7.11.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists