]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
efi_loader: initialize return values in efi_uninstall_multiple_protocol_interfaces_int()
authorIlias Apalodimas <ilias.apalodimas@linaro.org>
Thu, 10 Nov 2022 08:21:24 +0000 (10:21 +0200)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Wed, 16 Nov 2022 07:34:06 +0000 (08:34 +0100)
If the va_list we got handed over contains no protocols we must return
EFI_SUCCESS.  However in that case the current code just returns
an unintialized value.
Fix that by setting the return value in the variable definition

Addresses-Coverity: CID 376195:  ("Uninitialized variables  (UNINIT)")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
lib/efi_loader/efi_boottime.c

index a56021559bbf5e29aaabd58e71c32b5de635198d..253f9f75ef63b53aae7f8ec2356e230e15c1313e 100644 (file)
@@ -2754,7 +2754,7 @@ efi_uninstall_multiple_protocol_interfaces_int(efi_handle_t handle,
 {
        const efi_guid_t *protocol;
        void *protocol_interface;
-       efi_status_t ret;
+       efi_status_t ret = EFI_SUCCESS;
        size_t i = 0;
        efi_va_list argptr_copy;