aboutsummaryrefslogtreecommitdiff
path: root/common/spl
diff options
context:
space:
mode:
authorPhilippe Reynes2020-11-24 16:15:05 +0100
committerTom Rini2021-01-16 14:49:09 -0500
commitc61b2bf30c090b19cb2e84a7cf6e29de8773a411 (patch)
tree8271669e621145ca1db045ca17aea4b9a3be3486 /common/spl
parentd2e64d29c44dee6d455f7705dd1cf1af8674ad9a (diff)
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 <philippe.reynes@softathome.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/spl')
-rw-r--r--common/spl/spl_fit.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
index 795e2922ce9..a6ad094e91a 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));