summaryrefslogtreecommitdiff
path: root/drivers/of/base.c
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2012-06-27 09:44:45 +0530
committerRob Herring <rob.herring@calxeda.com>2012-07-06 07:16:33 -0500
commita3a7cab17d36bb591867a6d3ea41b5fdb4e44d87 (patch)
treea9f7a2e4af782a47032b647db6f8de867c20f4c2 /drivers/of/base.c
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/base.c')
-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,
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;