From bac318743905e55ce424104cafbc8418e0672a80 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Sun, 23 Mar 2025 19:11:13 +0000 Subject: [efi] Use efi_open() for all ephemeral protocol opens Signed-off-by: Michael Brown --- src/image/efi_image.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/image') diff --git a/src/image/efi_image.c b/src/image/efi_image.c index d2171e7de..ae9255ce5 100644 --- a/src/image/efi_image.c +++ b/src/image/efi_image.c @@ -234,12 +234,9 @@ static int efi_image_exec ( struct image *image ) { } /* Get the loaded image protocol for the newly loaded image */ - efirc = bs->OpenProtocol ( handle, &efi_loaded_image_protocol_guid, - &loaded.interface, efi_image_handle, - NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL ); - if ( efirc ) { + if ( ( rc = efi_open ( handle, &efi_loaded_image_protocol_guid, + &loaded.interface ) ) != 0 ) { /* Should never happen */ - rc = -EEFI ( efirc ); goto err_open_protocol; } -- cgit v1.2.3-55-g7522