Maximilian Brune has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/82773?usp=email )
Change subject: lib/device_tree.c: Fix wrong check for FDT validity ......................................................................
lib/device_tree.c: Fix wrong check for FDT validity
Obviously one should return NULL if a FDT is not valid an not the other way around.
Signed-off-by: Maximilian Brune maximilian.brune@9elements.com Change-Id: I77c0e187b841e60965daac17025110181bdd32bc --- M src/lib/device_tree.c 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/73/82773/1
diff --git a/src/lib/device_tree.c b/src/lib/device_tree.c index 2bfd5dd..bddb9ba 100644 --- a/src/lib/device_tree.c +++ b/src/lib/device_tree.c @@ -607,7 +607,7 @@ const struct fdt_header *header = (const struct fdt_header *)blob; tree->header = header;
- if (fdt_is_valid(blob)) + if (!fdt_is_valid(blob)) return NULL;
uint32_t struct_offset = be32toh(header->structure_offset);