Merge tag 'ti-v2020.07-rc3' of https://gitlab.denx.de/u-boot/custodians/u-boot-ti
[oweals/u-boot.git] / common / spl / spl_fit.c
index 69dabd27f6d9d330ac7efdd7356945dce595dc55..f581a2242132e29903df4b018a8bc4af5980075e 100644 (file)
 #include <fpga.h>
 #include <gzip.h>
 #include <image.h>
+#include <log.h>
 #include <malloc.h>
 #include <spl.h>
+#include <asm/cache.h>
 #include <linux/libfdt.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -425,8 +427,7 @@ static int spl_fit_append_fdt(struct spl_image_info *spl_image,
                        debug("%s: DT overlay %s applied\n", __func__,
                              fit_get_name(fit, node, NULL));
                }
-               if (tmpbuffer)
-                       free(tmpbuffer);
+               free(tmpbuffer);
                if (ret)
                        return ret;
        }