[PATCH 04/13] efi_loader: Update startimage_exit self-test to check error

Heinrich Schuchardt xypron.glpk at gmx.de
Tue Nov 26 10:26:29 CET 2024


On 26.11.24 07:29, Ilias Apalodimas wrote:
> On Mon, 25 Nov 2024 at 22:45, Simon Glass <sjg at chromium.org> wrote:
>>
>> Check for an error returned from the decompress() function, just in
>> case.
>>
>> Signed-off-by: Simon Glass <sjg at chromium.org>
>> ---
>>
>>   lib/efi_selftest/efi_selftest_startimage_exit.c | 6 ++++--
>>   1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/lib/efi_selftest/efi_selftest_startimage_exit.c b/lib/efi_selftest/efi_selftest_startimage_exit.c
>> index b65a10b7a4b..8d119f054c5 100644
>> --- a/lib/efi_selftest/efi_selftest_startimage_exit.c
>> +++ b/lib/efi_selftest/efi_selftest_startimage_exit.c
>> @@ -84,13 +84,15 @@ static efi_status_t decompress(u8 **image)
>>   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;
>>   }
>>
>>   /*
>> --
>> 2.43.0
>>
> Reviewed-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>

Reviewed-by: Heinrich Schuchardt <xypron.glpk at gmx.de>


More information about the U-Boot mailing list