[PATCH] bootm: Return error when devicetree file is not a dtb
Sascha Hauer
s.hauer at pengutronix.de
Thu Feb 13 04:43:57 EST 2014
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 at 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
More information about the barebox
mailing list