Fix incorrect return code of boot option update

Correct the return code for out-of-memory and no boot option found

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
Raymond Mao
2023-06-19 14:22:59 -07:00
committed by Heinrich Schuchardt
parent 339b527bd4
commit 9945bc4f86
3 changed files with 8 additions and 4 deletions

View File

@@ -352,7 +352,7 @@ static struct bootmenu_data *bootmenu_create(int delay)
* a architecture-specific default image name such as BOOTAA64.EFI.
*/
efi_ret = efi_bootmgr_update_media_device_boot_option();
if (efi_ret != EFI_SUCCESS && efi_ret != EFI_NOT_FOUND)
if (efi_ret != EFI_SUCCESS)
goto cleanup;
ret = prepare_uefi_bootorder_entry(menu, &iter, &i);