diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2012-06-27 09:44:45 +0530 |
---|---|---|
committer | Rob Herring <rob.herring@calxeda.com> | 2012-07-06 07:16:33 -0500 |
commit | a3a7cab17d36bb591867a6d3ea41b5fdb4e44d87 (patch) | |
tree | a9f7a2e4af782a47032b647db6f8de867c20f4c2 /drivers/of | |
parent | 177259c3ecca713b5995988309ea0ffd7383c286 (diff) | |
download | linux-stable-a3a7cab17d36bb591867a6d3ea41b5fdb4e44d87.tar.gz linux-stable-a3a7cab17d36bb591867a6d3ea41b5fdb4e44d87.tar.bz2 linux-stable-a3a7cab17d36bb591867a6d3ea41b5fdb4e44d87.zip |
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.c | 6 |
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, return NULL; read_lock(&devtree_lock); - for (pp = np->properties; pp != 0; pp = pp->next) { + for (pp = np->properties; pp; pp = pp->next) { if (of_prop_cmp(pp->name, name) == 0) { - if (lenp != 0) + if (lenp) *lenp = pp->length; break; } @@ -497,7 +497,7 @@ struct device_node *of_find_node_with_property(struct device_node *from, read_lock(&devtree_lock); np = from ? from->allnext : allnodes; for (; np; np = np->allnext) { - for (pp = np->properties; pp != 0; pp = pp->next) { + for (pp = np->properties; pp; pp = pp->next) { if (of_prop_cmp(pp->name, prop_name) == 0) { of_node_get(np); goto out; |