scripts/dtc: Update to upstream version v1.5.1-22-gc40aeb60b47a
[linux-2.6-microblaze.git] / scripts / dtc / livetree.c
index 0c03999..032df58 100644 (file)
@@ -526,8 +526,7 @@ struct node *get_node_by_path(struct node *tree, const char *path)
        p = strchr(path, '/');
 
        for_each_child(tree, child) {
-               if (p && (strlen(child->name) == p-path) &&
-                   strprefixeq(path, p - path, child->name))
+               if (p && strprefixeq(path, p - path, child->name))
                        return get_node_by_path(child, p+1);
                else if (!p && streq(path, child->name))
                        return child;