diff options
author | Tom Rini <trini@konsulko.com> | 2023-07-28 12:48:00 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-07-28 12:48:00 -0400 |
commit | a36d59ba99a19c777d896d4c70e75975654e2831 (patch) | |
tree | d0b3000aa039ad1085506ddff514c882c67f2701 /cmd/bootefi.c | |
parent | 6544943819bdb8258195c0eb5716345dd5bba070 (diff) | |
parent | 6e8fa0611f19824e200fe4725f18bce7e2000071 (diff) |
Merge tag 'efi-2023-10-rc2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request for efi-2023-10-rc2
Documentation:
* Update the documentation for TI K3 boards (use SVG images)
* Update doc/sphinx/requirements.txt
* Describe QEMU emulation of block devices
UEFI
* Fix device paths for special block devices
Diffstat (limited to 'cmd/bootefi.c')
-rw-r--r-- | cmd/bootefi.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/cmd/bootefi.c b/cmd/bootefi.c index 5c0afec1544..f73d6eb0e2d 100644 --- a/cmd/bootefi.c +++ b/cmd/bootefi.c @@ -607,20 +607,6 @@ failure: } /** - * bootefi_run_finish() - finish up after running an EFI test - * - * @loaded_image_info: Pointer to a struct which holds the loaded image info - * @image_obj: Pointer to a struct which holds the loaded image object - */ -static void bootefi_run_finish(struct efi_loaded_image_obj *image_obj, - struct efi_loaded_image *loaded_image_info) -{ - efi_restore_gd(); - free(loaded_image_info->load_options); - efi_delete_handle(&image_obj->header); -} - -/** * do_efi_selftest() - execute EFI selftest * * Return: status code @@ -638,7 +624,12 @@ static int do_efi_selftest(void) /* Execute the test */ ret = EFI_CALL(efi_selftest(&image_obj->header, &systab)); - bootefi_run_finish(image_obj, loaded_image_info); + efi_restore_gd(); + free(loaded_image_info->load_options); + if (ret != EFI_SUCCESS) + efi_delete_handle(&image_obj->header); + else + ret = efi_delete_handle(&image_obj->header); return ret != EFI_SUCCESS; } |