diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-02-13 10:36:30 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-02-13 10:43:52 +0100 |
commit | b069d6b876064b8eca973882157f172a9ccefcab (patch) | |
tree | 657589f6ef748c9275dda3d549da0b38bb64bf29 | |
parent | 4f2f9150b748f278a02c7874e9fc3fd026082581 (diff) | |
download | barebox-b069d6b876064b8eca973882157f172a9ccefcab.tar.gz barebox-b069d6b876064b8eca973882157f172a9ccefcab.tar.xz |
bootm: Return error when devicetree file is not a dtb
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>
-rw-r--r-- | common/bootm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/common/bootm.c b/common/bootm.c index d62d011e2a..12d3ee0c46 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); |