X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=tools%2Ffit_common.c;h=9506390214ce028bbe0045d88161538ec652da2d;hb=6b95b38c41a6a56d48b51b192dac7365ce0a8024;hp=81ba698abd2594727522559c0ca8560268bdae20;hpb=84f24ac8278d287581e5a559a7299e1dc2b53481;p=oweals%2Fu-boot.git diff --git a/tools/fit_common.c b/tools/fit_common.c index 81ba698abd..9506390214 100644 --- a/tools/fit_common.c +++ b/tools/fit_common.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * (C) Copyright 2014 * DENX Software Engineering @@ -14,8 +15,6 @@ * some functions added to address abstraction * * All rights reserved. - * - * SPDX-License-Identifier: GPL-2.0+ */ #include "imagetool.h" @@ -27,7 +26,10 @@ int fit_verify_header(unsigned char *ptr, int image_size, struct image_tool_params *params) { - return fdt_check_header(ptr); + if (fdt_check_header(ptr) != EXIT_SUCCESS || !fit_check_format(ptr)) + return EXIT_FAILURE; + + return EXIT_SUCCESS; } int fit_check_image_types(uint8_t type)