Commit 589b754d authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Rob Herring

of: overlay: Make node skipping in init_overlay_changeset() clearer

Make it more clear that nodes without "__overlay__" subnodes are
skipped, by reverting the logic and using continue.
This also reduces indentation level.
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent 35e691ed
...@@ -573,18 +573,19 @@ static int init_overlay_changeset(struct overlay_changeset *ovcs, ...@@ -573,18 +573,19 @@ static int init_overlay_changeset(struct overlay_changeset *ovcs,
cnt = 0; cnt = 0;
for_each_child_of_node(tree, node) { for_each_child_of_node(tree, node) {
overlay_node = of_get_child_by_name(node, "__overlay__"); overlay_node = of_get_child_by_name(node, "__overlay__");
if (overlay_node) { if (!overlay_node)
fragment = &fragments[cnt]; continue;
fragment->overlay = overlay_node;
fragment->target = find_target_node(node);
if (!fragment->target) {
of_node_put(fragment->overlay);
ret = -EINVAL;
goto err_free_fragments;
}
cnt++; fragment = &fragments[cnt];
fragment->overlay = overlay_node;
fragment->target = find_target_node(node);
if (!fragment->target) {
of_node_put(fragment->overlay);
ret = -EINVAL;
goto err_free_fragments;
} }
cnt++;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment