From: Harald Welte <laforge@gnumonks.org>
To: barebox@lists.infradead.org
Subject: [PATCH] Print error message if of_state_fixup() fails
Date: Wed, 17 Feb 2016 19:29:46 +0100 [thread overview]
Message-ID: <1455733786-22229-1-git-send-email-laforge@gnumonks.org> (raw)
If of_state_fixup() fails for some reason, boot/bootm will fail, too
However, it is completely unclear where the error has happened, and to
the user it rather seems like the kernel device tree loaded from some
file was broken/corrupt, not that in fact some fixup routine was
failing.
Adding a meaningful error message can help debugging significantly.
Signed-off-by: Harald Welte <laforge@gnumonks.org>
---
common/state.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/common/state.c b/common/state.c
index 3e95efd..b55b150 100644
--- a/common/state.c
+++ b/common/state.c
@@ -999,6 +999,7 @@ static int of_state_fixup(struct device_node *root, void *ctx)
return 0;
out:
+ dev_err(&state->dev, "error fixing up device tree with boot state\n");
of_delete_node(new_node);
return ret;
}
--
2.7.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2016-02-17 18:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-17 18:29 Harald Welte [this message]
2016-02-18 11:58 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1455733786-22229-1-git-send-email-laforge@gnumonks.org \
--to=laforge@gnumonks.org \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox