efi_loader: Update startimage_exit self-test to check error
Check for an error returned from the decompress() function, just in
case.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
diff --git a/lib/efi_selftest/efi_selftest_startimage_exit.c b/lib/efi_selftest/efi_selftest_startimage_exit.c
index b65a10b..8d119f0 100644
--- a/lib/efi_selftest/efi_selftest_startimage_exit.c
+++ b/lib/efi_selftest/efi_selftest_startimage_exit.c
@@ -84,13 +84,15 @@
static int setup(const efi_handle_t handle,
const struct efi_system_table *systable)
{
+ efi_status_t ret;
+
image_handle = handle;
boottime = systable->boottime;
/* Load the application image into memory */
- decompress(&image);
+ ret = decompress(&image);
- return EFI_ST_SUCCESS;
+ return ret;
}
/*