summaryrefslogtreecommitdiff
path: root/lib/efi_loader
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2026-03-09 15:26:34 -0600
committerTom Rini <[email protected]>2026-03-09 15:26:34 -0600
commit1e240f7206fccde4ec73ea432ab8360d321c5fe5 (patch)
tree931d5985e8a237b5604999922f5662fc464a8817 /lib/efi_loader
parent36add050eea439f0b2a15e4ea0d3a8e21216f159 (diff)
parentba7bf918dafcd093ad733b07ba490baeb20cf5da (diff)
Merge tag 'v2026.04-rc4' into next
Prepare v2026.04-rc4
Diffstat (limited to 'lib/efi_loader')
-rw-r--r--lib/efi_loader/efi_boottime.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index b424d924896..de57823bd44 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -2096,8 +2096,12 @@ efi_status_t EFIAPI efi_load_image(bool boot_policy,
EFI_ENTRY("%d, %p, %pD, %p, %zu, %p", boot_policy, parent_image,
file_path, source_buffer, source_size, image_handle);
- if (!image_handle || (!source_buffer && !file_path) ||
- !efi_search_obj(parent_image) ||
+ if (!source_buffer && !file_path) {
+ ret = EFI_NOT_FOUND;
+ goto error;
+ }
+
+ if (!image_handle || !efi_search_obj(parent_image) ||
/* The parent image handle must refer to a loaded image */
!parent_image->type) {
ret = EFI_INVALID_PARAMETER;