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 <[email protected]>
---
 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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to