summaryrefslogtreecommitdiffstats
path: root/drivers/of/resolver.c
diff options
context:
space:
mode:
authorLuca Ceresoli <luca@lucaceresoli.net>2020-02-28 09:40:27 +0100
committerRob Herring <robh@kernel.org>2020-03-02 18:32:44 +0100
commita3958323f5fea2c400e40473f79f6816c0a2eb6b (patch)
tree9af9b7063cec46e43ac058010be9bc9ab12f53ae /drivers/of/resolver.c
parentof: unittest: make gpio overlay test dependent on CONFIG_OF_GPIO (diff)
downloadlinux-a3958323f5fea2c400e40473f79f6816c0a2eb6b.tar.xz
linux-a3958323f5fea2c400e40473f79f6816c0a2eb6b.zip
of: overlay: log the error cause on resolver failure
When a DT overlay has a node label that is not present in the live devicetree symbols table, this error is printed: OF: resolver: overlay phandle fixup failed: -22 create_overlay: Failed to create overlay (err=-22) which does not help much in finding the node label that caused the problem and fix the overlay source. Add an error message with the name of the node label that caused the error. The new output is: OF: resolver: node label 'gpio9' not found in live devicetree symbols table OF: resolver: overlay phandle fixup failed: -22 create_overlay: Failed to create overlay (err=-22) Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Reviewed-by: Frank Rowand <frank.rowand@sony.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of/resolver.c')
-rw-r--r--drivers/of/resolver.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/of/resolver.c b/drivers/of/resolver.c
index 83c766233181..b278ab4338ce 100644
--- a/drivers/of/resolver.c
+++ b/drivers/of/resolver.c
@@ -321,8 +321,11 @@ int of_resolve_phandles(struct device_node *overlay)
err = of_property_read_string(tree_symbols,
prop->name, &refpath);
- if (err)
+ if (err) {
+ pr_err("node label '%s' not found in live devicetree symbols table\n",
+ prop->name);
goto out;
+ }
refnode = of_find_node_by_path(refpath);
if (!refnode) {