Commit 4458db4c authored by Frank Rowand's avatar Frank Rowand Committed by Rob Herring

of: Move setting of pointer to beside test for non-null

Value of pointer was calculated in an earlier block than
where it was used.  Move it down into the block where it
is used, immediately before where is is checked to be valid.
Signed-off-by: default avatarFrank Rowand <frank.rowand@am.sony.com>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent d9181b20
...@@ -320,8 +320,6 @@ int of_resolve_phandles(struct device_node *overlay) ...@@ -320,8 +320,6 @@ int of_resolve_phandles(struct device_node *overlay)
overlay_symbols = NULL; overlay_symbols = NULL;
overlay_fixups = NULL; overlay_fixups = NULL;
tree_symbols = of_find_node_by_path("/__symbols__");
for_each_child_of_node(overlay, child) { for_each_child_of_node(overlay, child) {
if (!of_node_cmp(child->name, "__symbols__")) if (!of_node_cmp(child->name, "__symbols__"))
overlay_symbols = child; overlay_symbols = child;
...@@ -334,6 +332,7 @@ int of_resolve_phandles(struct device_node *overlay) ...@@ -334,6 +332,7 @@ int of_resolve_phandles(struct device_node *overlay)
goto out; goto out;
} }
tree_symbols = of_find_node_by_path("/__symbols__");
if (!tree_symbols) { if (!tree_symbols) {
pr_err("no symbols in root of device tree.\n"); pr_err("no symbols in root of device tree.\n");
err = -EINVAL; err = -EINVAL;
......
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