aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/of
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2012-06-27 00:14:45 -0400
committerRob Herring <rob.herring@calxeda.com>2012-07-06 08:16:33 -0400
commita3a7cab17d36bb591867a6d3ea41b5fdb4e44d87 (patch)
treea9f7a2e4af782a47032b647db6f8de867c20f4c2 /drivers/of
parent177259c3ecca713b5995988309ea0ffd7383c286 (diff)
of: Fix null pointer related warnings in base.c file
Fixes the following sparse warnings: drivers/of/base.c:176:41: warning: Using plain integer as NULL pointer drivers/of/base.c:178:37: warning: Using plain integer as NULL pointer drivers/of/base.c:500:49: warning: Using plain integer as NULL pointer Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Diffstat (limited to 'drivers/of')
-rw-r--r--drivers/of/base.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c
index d9bfd49b1935..ddba57799fd7 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;