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
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82773
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
diff --git a/src/lib/device_tree.c b/src/lib/device_tree.c
index aff9e15..4f5cc07 100644
--- a/src/lib/device_tree.c
+++ b/src/lib/device_tree.c
@@ -608,7 +608,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);