of: Add back an error message, restructured
Add a single pr_err() to cover a range of errors that were reported by several pr_err() that were removed earlier in this series. Signed-off-by: Frank Rowand <frank.rowand@am.sony.com> Signed-off-by: Rob Herring <robh@kernel.org>
This commit is contained in:
parent
269f1a67d0
commit
d9181b20a8
|
@ -293,13 +293,17 @@ int of_resolve_phandles(struct device_node *overlay)
|
||||||
phandle phandle, phandle_delta;
|
phandle phandle, phandle_delta;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
|
tree_symbols = NULL;
|
||||||
|
|
||||||
if (!overlay) {
|
if (!overlay) {
|
||||||
pr_err("null overlay\n");
|
pr_err("null overlay\n");
|
||||||
return -EINVAL;
|
err = -EINVAL;
|
||||||
|
goto err_out;
|
||||||
}
|
}
|
||||||
if (!of_node_check_flag(overlay, OF_DETACHED)) {
|
if (!of_node_check_flag(overlay, OF_DETACHED)) {
|
||||||
pr_err("overlay not detached\n");
|
pr_err("overlay not detached\n");
|
||||||
return -EINVAL;
|
err = -EINVAL;
|
||||||
|
goto err_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
phandle_delta = live_tree_max_phandle() + 1;
|
phandle_delta = live_tree_max_phandle() + 1;
|
||||||
|
@ -311,7 +315,7 @@ int of_resolve_phandles(struct device_node *overlay)
|
||||||
|
|
||||||
err = adjust_local_phandle_references(local_fixups, overlay, phandle_delta);
|
err = adjust_local_phandle_references(local_fixups, overlay, phandle_delta);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
goto err_out;
|
||||||
|
|
||||||
overlay_symbols = NULL;
|
overlay_symbols = NULL;
|
||||||
overlay_fixups = NULL;
|
overlay_fixups = NULL;
|
||||||
|
@ -333,7 +337,7 @@ int of_resolve_phandles(struct device_node *overlay)
|
||||||
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;
|
||||||
goto out;
|
goto err_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
for_each_property_of_node(overlay_fixups, prop) {
|
for_each_property_of_node(overlay_fixups, prop) {
|
||||||
|
@ -345,12 +349,12 @@ int of_resolve_phandles(struct device_node *overlay)
|
||||||
err = of_property_read_string(tree_symbols,
|
err = of_property_read_string(tree_symbols,
|
||||||
prop->name, &refpath);
|
prop->name, &refpath);
|
||||||
if (err)
|
if (err)
|
||||||
goto out;
|
goto err_out;
|
||||||
|
|
||||||
refnode = of_find_node_by_path(refpath);
|
refnode = of_find_node_by_path(refpath);
|
||||||
if (!refnode) {
|
if (!refnode) {
|
||||||
err = -ENOENT;
|
err = -ENOENT;
|
||||||
goto out;
|
goto err_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
phandle = refnode->phandle;
|
phandle = refnode->phandle;
|
||||||
|
@ -361,6 +365,8 @@ int of_resolve_phandles(struct device_node *overlay)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err_out:
|
||||||
|
pr_err("overlay phandle fixup failed: %d\n", err);
|
||||||
out:
|
out:
|
||||||
of_node_put(tree_symbols);
|
of_node_put(tree_symbols);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue