summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-09-08 15:48:41 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2015-09-08 15:48:44 +0200
commitbf62a6e2d8cb697656a0193d9c43589d62253dd1 (patch)
tree25f21be7c4840f47197662a8c57f2881e708a23c /common
parent200ba6cdeea8e023a6af94cd5aeefce4b2daf879 (diff)
downloadbarebox-bf62a6e2d8cb697656a0193d9c43589d62253dd1.tar.gz
barebox-bf62a6e2d8cb697656a0193d9c43589d62253dd1.tar.xz
of_fix_tree: Print error message
When a of_fixup handler fails add a meaningful error message so that the user gets a clue what might have gone wrong. Suggested-by: Enrico Joerns <ejo@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r--common/oftree.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/common/oftree.c b/common/oftree.c
index f75d7b4bfe..cafe46c469 100644
--- a/common/oftree.c
+++ b/common/oftree.c
@@ -189,8 +189,11 @@ int of_fix_tree(struct device_node *node)
list_for_each_entry(of_fixup, &of_fixup_list, list) {
ret = of_fixup->fixup(node, of_fixup->context);
- if (ret)
+ if (ret) {
+ pr_err("Failed to fixup node in %pS: %s\n",
+ of_fixup->fixup, strerror(-ret));
return ret;
+ }
}
return 0;