]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
of: return -ENOENT when no property
authorAlexandre Courbot <acourbot@nvidia.com>
Fri, 29 Jun 2012 04:57:58 +0000 (13:57 +0900)
committerRob Herring <rob.herring@calxeda.com>
Fri, 6 Jul 2012 12:16:34 +0000 (07:16 -0500)
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>
drivers/of/base.c

index ddba57799fd7c9763c60e384d3b5dcc7148d202d..85757952f12dc05970b2b6a690ec07ca17738c3f 100644 (file)
@@ -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 */