[PATCH] bootm: Return error when devicetree file is not a dtb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux