From 0a67f248d51686a870b14e7aabb1ae637a7fee05 Mon Sep 17 00:00:00 2001 From: Benoit Cousson Date: Mon, 5 Dec 2011 15:23:54 +0100 Subject: [PATCH] --- yaml --- r: 280128 b: refs/heads/master c: 88af7f58c6f1fa28d617392c791f11317bcb590d h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/of/base.c | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index c31de38e1aff..9235c6a57bd5 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 44ad56b7df54cbc8063b46883d183e4e2f09f831 +refs/heads/master: 88af7f58c6f1fa28d617392c791f11317bcb590d diff --git a/trunk/drivers/of/base.c b/trunk/drivers/of/base.c index 9b6588ef0673..b7072437eb8c 100644 --- a/trunk/drivers/of/base.c +++ b/trunk/drivers/of/base.c @@ -752,7 +752,7 @@ int of_property_read_string_index(struct device_node *np, const char *propname, for (i = 0; total < prop->length; total += l, p += l) { l = strlen(p) + 1; - if ((*p != 0) && (i++ == index)) { + if (i++ == index) { *output = p; return 0; } @@ -790,11 +790,9 @@ int of_property_count_strings(struct device_node *np, const char *propname) p = prop->value; - for (i = 0; total < prop->length; total += l, p += l) { + for (i = 0; total < prop->length; total += l, p += l, i++) l = strlen(p) + 1; - if (*p != 0) - i++; - } + return i; } EXPORT_SYMBOL_GPL(of_property_count_strings);