diff options
author | Simon Glass <sjg@chromium.org> | 2024-12-19 11:28:57 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-12-27 15:16:10 -0600 |
commit | 5f158d8832cf10f76eed3277253ca7ff43df04d7 (patch) | |
tree | 6b4d815f5247a114415da9970efcbd4c8be1fbbd /common/spl/spl.c | |
parent | 92a4fd0a2902d97b358e9001b2950187b029fa16 (diff) |
spl: Report a loader failure
If a loader returns an error code it is silently ignored. Show a message
to at least provide some feedback to the user.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/spl/spl.c')
-rw-r--r-- | common/spl/spl.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c index 1ceb63daf31..7c57eb8539b 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -612,6 +612,7 @@ static int boot_from_devices(struct spl_image_info *spl_image, for (i = 0; i < count && spl_boot_list[i] != BOOT_DEVICE_NONE; i++) { struct spl_image_loader *loader; int bootdev = spl_boot_list[i]; + int ret; if (CONFIG_IS_ENABLED(SHOW_ERRORS)) ret = -ENXIO; @@ -631,10 +632,13 @@ static int boot_from_devices(struct spl_image_info *spl_image, "Unsupported Boot Device!\n"); } } - if (loader && - !spl_load_image(spl_image, loader)) { - spl_image->boot_device = bootdev; - return 0; + if (loader) { + ret = spl_load_image(spl_image, loader); + if (!ret) { + spl_image->boot_device = bootdev; + return 0; + } + printf("Error: %d\n", ret); } } } |