All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] eficonfig: fix missing variable initialization
@ 2022-11-14 10:00 Masahisa Kojima
  2022-11-14 11:15 ` Ilias Apalodimas
  0 siblings, 1 reply; 2+ messages in thread
From: Masahisa Kojima @ 2022-11-14 10:00 UTC (permalink / raw)
  To: u-boot; +Cc: Heinrich Schuchardt, Ilias Apalodimas, Masahisa Kojima

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>
---
 cmd/eficonfig.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmd/eficonfig.c b/cmd/eficonfig.c
index 2595dd9563..0a768d8013 100644
--- a/cmd/eficonfig.c
+++ b/cmd/eficonfig.c
@@ -2280,10 +2280,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;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] eficonfig: fix missing variable initialization
  2022-11-14 10:00 [PATCH] eficonfig: fix missing variable initialization Masahisa Kojima
@ 2022-11-14 11:15 ` Ilias Apalodimas
  0 siblings, 0 replies; 2+ messages in thread
From: Ilias Apalodimas @ 2022-11-14 11:15 UTC (permalink / raw)
  To: Masahisa Kojima; +Cc: u-boot, Heinrich Schuchardt

On Mon, 14 Nov 2022 at 11:59, Masahisa Kojima
<masahisa.kojima@linaro.org> wrote:
>
> 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>
> ---
>  cmd/eficonfig.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/cmd/eficonfig.c b/cmd/eficonfig.c
> index 2595dd9563..0a768d8013 100644
> --- a/cmd/eficonfig.c
> +++ b/cmd/eficonfig.c
> @@ -2280,10 +2280,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;
> --
> 2.17.1
>

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-11-14 11:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-14 10:00 [PATCH] eficonfig: fix missing variable initialization Masahisa Kojima
2022-11-14 11:15 ` Ilias Apalodimas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.