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);