From: Philippe Reynes Date: Tue, 24 Nov 2020 15:15:05 +0000 (+0100) Subject: common: spl: spl_fit.c: report an error on hash check fail X-Git-Tag: baikal/mips/sdk5.9~34^2^2~242^2~19 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=3bace0f3153b814344ab7070b217a6aeacca20a7;p=uboot.git common: spl: spl_fit.c: report an error on hash check fail When the hash check fails on a loadable image, the SPL/TPL simply jump to the next one. This commit changes this behaviour, when the hash check fails on a loadable image, the function spl_load_simple_fit stops and report an error. Signed-off-by: Philippe Reynes Reviewed-by: Simon Glass --- diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index 795e2922ce..a6ad094e91 100644 --- a/common/spl/spl_fit.c +++ b/common/spl/spl_fit.c @@ -684,8 +684,11 @@ int spl_load_simple_fit(struct spl_image_info *spl_image, ret = spl_load_fit_image(info, sector, fit, base_offset, node, &image_info); - if (ret < 0) - continue; + if (ret < 0) { + printf("%s: can't load image loadables index %d (ret = %d)\n", + __func__, index, ret); + return ret; + } if (!spl_fit_image_get_os(fit, node, &os_type)) debug("Loadable is %s\n", genimg_get_os_name(os_type));