]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
eficonfig: fix missing variable initialization
authorMasahisa Kojima <masahisa.kojima@linaro.org>
Mon, 14 Nov 2022 10:00:47 +0000 (19:00 +0900)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Wed, 16 Nov 2022 07:34:06 +0000 (08:34 +0100)
The 'ret' variable must be initialized before use
in eficonfig_delete_invalid_boot_option().

Fixes: c416f1c0bc ("bootmenu: add removable media entries")
Addresses-Coverity: 376207 ("Uninitialized variables")
Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
cmd/eficonfig.c

index 0dc6e7b01e4596ce3e0dd11c72d2899c73dfef73..2b143894d37860e506503cc506a1247f537e5a52 100644 (file)
@@ -2278,10 +2278,10 @@ efi_status_t eficonfig_delete_invalid_boot_option(struct eficonfig_media_boot_op
 {
        u32 i, j;
        efi_uintn_t size;
-       efi_status_t ret;
        void *load_option;
        struct efi_load_option lo;
        u16 varname[] = u"Boot####";
+       efi_status_t ret = EFI_SUCCESS;
 
        for (i = 0; i <= 0xFFFF; i++) {
                efi_uintn_t tmp;