* [PATCH] bootm: Return error when devicetree file is not a dtb
@ 2014-02-13 9:43 Sascha Hauer
0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2014-02-13 9:43 UTC (permalink / raw)
To: barebox
We check whether the file passed as devicetree actually is a devicetree,
but we missed to return an error if it's not. Fix this.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
common/bootm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/common/bootm.c b/common/bootm.c
index d62d011..12d3ee0 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -294,6 +294,7 @@ static int bootm_open_oftree(struct image_data *data, const char *oftree, int nu
if (ft != filetype_oftree) {
printf("%s is not an oftree but %s\n", oftree,
file_type_to_string(ft));
+ return -EINVAL;
}
data->of_root_node = of_unflatten_dtb(NULL, fdt);
--
1.8.5.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-02-13 9:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-13 9:43 [PATCH] bootm: Return error when devicetree file is not a dtb Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox