mtd: mxs_nand: fix the gf_13/14 definition issue
[oweals/u-boot.git] / common / boot_fit.c
index ce4293184ae69b44a14f9d9116f0fd8694daf2b5..ffa4d740eb3e9923e3a6ec1fb14f3f6d4ad8aa78 100644 (file)
@@ -1,17 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2017
  * Texas Instruments, <www.ti.com>
  *
  * Franklin S Cooper Jr. <fcooper@ti.com>
- *
- * SPDX-License-Identifier:     GPL-2.0+
  */
 
 #include <boot_fit.h>
 #include <common.h>
 #include <errno.h>
 #include <image.h>
-#include <libfdt.h>
+#include <linux/libfdt.h>
 
 static int fdt_offset(const void *fit)
 {
@@ -73,7 +72,7 @@ void *locate_dtb_in_fit(const void *fit)
 
        ret = fdt_offset(fit);
 
-       if (ret <= 0)
+       if (ret < 0)
                return NULL;
        else
                return (void *)fit+size+ret;