diff options
Diffstat (limited to 'drivers/of/base.c')
-rw-r--r-- | drivers/of/base.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c index a14f109dcd13..c181b94abc36 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c | |||
@@ -173,9 +173,9 @@ struct property *of_find_property(const struct device_node *np, | |||
173 | return NULL; | 173 | return NULL; |
174 | 174 | ||
175 | read_lock(&devtree_lock); | 175 | read_lock(&devtree_lock); |
176 | for (pp = np->properties; pp != 0; pp = pp->next) { | 176 | for (pp = np->properties; pp; pp = pp->next) { |
177 | if (of_prop_cmp(pp->name, name) == 0) { | 177 | if (of_prop_cmp(pp->name, name) == 0) { |
178 | if (lenp != 0) | 178 | if (lenp) |
179 | *lenp = pp->length; | 179 | *lenp = pp->length; |
180 | break; | 180 | break; |
181 | } | 181 | } |
@@ -497,7 +497,7 @@ struct device_node *of_find_node_with_property(struct device_node *from, | |||
497 | read_lock(&devtree_lock); | 497 | read_lock(&devtree_lock); |
498 | np = from ? from->allnext : allnodes; | 498 | np = from ? from->allnext : allnodes; |
499 | for (; np; np = np->allnext) { | 499 | for (; np; np = np->allnext) { |
500 | for (pp = np->properties; pp != 0; pp = pp->next) { | 500 | for (pp = np->properties; pp; pp = pp->next) { |
501 | if (of_prop_cmp(pp->name, prop_name) == 0) { | 501 | if (of_prop_cmp(pp->name, prop_name) == 0) { |
502 | of_node_get(np); | 502 | of_node_get(np); |
503 | goto out; | 503 | goto out; |
@@ -902,7 +902,7 @@ int of_parse_phandle_with_args(struct device_node *np, const char *list_name, | |||
902 | /* Retrieve the phandle list property */ | 902 | /* Retrieve the phandle list property */ |
903 | list = of_get_property(np, list_name, &size); | 903 | list = of_get_property(np, list_name, &size); |
904 | if (!list) | 904 | if (!list) |
905 | return -EINVAL; | 905 | return -ENOENT; |
906 | list_end = list + size / sizeof(*list); | 906 | list_end = list + size / sizeof(*list); |
907 | 907 | ||
908 | /* Loop over the phandles until all the requested entry is found */ | 908 | /* Loop over the phandles until all the requested entry is found */ |
@@ -1180,7 +1180,7 @@ static void of_alias_add(struct alias_prop *ap, struct device_node *np, | |||
1180 | ap->stem[stem_len] = 0; | 1180 | ap->stem[stem_len] = 0; |
1181 | list_add_tail(&ap->link, &aliases_lookup); | 1181 | list_add_tail(&ap->link, &aliases_lookup); |
1182 | pr_debug("adding DT alias:%s: stem=%s id=%i node=%s\n", | 1182 | pr_debug("adding DT alias:%s: stem=%s id=%i node=%s\n", |
1183 | ap->alias, ap->stem, ap->id, np ? np->full_name : NULL); | 1183 | ap->alias, ap->stem, ap->id, of_node_full_name(np)); |
1184 | } | 1184 | } |
1185 | 1185 | ||
1186 | /** | 1186 | /** |