From patchwork Mon Nov 14 10:00:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 624555 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2261031pvb; Mon, 14 Nov 2022 01:59:19 -0800 (PST) X-Google-Smtp-Source: AA0mqf7ZS1mWTyZOVQbPyaTzfgxn8r773tLWEtAxKEX2o8NrR9yk0UXV8RDYg0c48CkgvV7pO6tD X-Received: by 2002:a05:6102:3569:b0:3aa:4169:ca77 with SMTP id bh9-20020a056102356900b003aa4169ca77mr5509918vsb.16.1668419958928; Mon, 14 Nov 2022 01:59:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668419958; cv=none; d=google.com; s=arc-20160816; b=L8lZEiLWYNa8GherlXamksuLauHX6NUkP7WJFllF3ohGH6vVpOJciTyK2lPVC11pbb gBydfMHfFj+m0B3aTSgObKsK0NpTK5KJEy4bXjZLRjPjZSdJGuYnu59Xt+FUe3GhdfXg YZfbgq73Ib3BNDojKH7kolYblLIaT2enxVJi4Cx0UUcbI+ZTTpH7Az4FjuRkyGbAenk0 ICpiSrYiOwhV6IFvxn3ESM6ke47kVjqFMQBs2I7Nywua1cBdrCokidxodZi+SBj76fAP H2lxd3Jtk+cNywTOZ9q2PxA1/uuPv0+TWtQ4e1MVhsbE4vsB49ArzjqieoEtUk0iGwaU hpbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=GW60Nf5z43+nk65pgMklkF4a57/AnhL1DNpcT5A7prs=; b=GDHIP7WyxFKDOY2HX5vgT2PIhHTjGiqALIg1/PoyYosymSmGj64IWULxWj16dZfVzZ k1QiXPFkb1scWrWXZDubePpYEuXGcpz9H0uQ2CmzDoL7/fJfajf4BkqCOGzpEUIUxBe6 AdigqIKgVA2IourrR7y8zyfCMVNZlneiCl02y+u1/0ZMiPTPepgqZzqeJWz6IE/lXs/m 9WX6+NObjempea4TxfU1I+qakZodmdNIF/K+p9Eibno6MKY6pIhuI/VDspP6DuImPqQD 1prj/wjlgrXL+IM6m+wy4CMWBL7uSRO0D3Qas0vIUYDfVGzPoEAo3kNUaRild2JnEGwu +r4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CmG02Kci; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id s129-20020a675e87000000b003aa23b4ac79si1702311vsb.441.2022.11.14.01.59.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Nov 2022 01:59:18 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CmG02Kci; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DCA7A82B94; Mon, 14 Nov 2022 10:59:14 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="CmG02Kci"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 865CF82B94; Mon, 14 Nov 2022 10:59:12 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id F1AA282A4D for ; Mon, 14 Nov 2022 10:59:09 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=masahisa.kojima@linaro.org Received: by mail-pf1-x433.google.com with SMTP id g62so10498300pfb.10 for ; Mon, 14 Nov 2022 01:59:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GW60Nf5z43+nk65pgMklkF4a57/AnhL1DNpcT5A7prs=; b=CmG02KciJr3aw4NRfriOOIXFqMFG8LRqRhaUvtP1Q8lo8/Ysi2vVNN+ZFcVD9J6+0N /vWsCZC6rJZ9psdOj2JCmupElbrBt2xotwfn6duYt0Ar3RM5qpJ1btr1WwvBSwfr+0qc LcEiXax03mNbeEcEaaCj+KKm8mNVyNAcbscrgJQOBPidEja3zXQxTmrzTwUvf7ZCFfIF h/EIj+X5jPEWjeTgY/GWKP+MQZfC6/Ktf7RBBRxwLjeY8bQ/pYCZO8AIhaDTy9XlvQDc q1a2lIHPj+rdmKvEIdrcyyd1z+7oMYRWpC/A9TMpDYDmtuAUyMjg+ACQGs8/HLOK6qCy 4uOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GW60Nf5z43+nk65pgMklkF4a57/AnhL1DNpcT5A7prs=; b=IvhB1AgB4KzboKpkIR2a0n3Lyia+Q7b0R0Vnw8kaJD/GXB0HqAsR1uLNa6G6yHuSh8 J1shqn3hyu7vZs4L/YUW0bAP085vldTJL8gUnE74AnJJv1OTGVUwEBZ55s6mkLeZBR3T Wbvaai0NROWAjX69QypOXq4W4LwKJ526CSHevmEkSgIcHoMH7ABcNrCTbvVEXFvbMiok ctrYhwIBAd9g4LX375bfTU5sGhvtSGt5L4cboI/fJ0rYrNL3oYJUFEcdoSQqHY38xtHn qxyvI5ugyM6oCX9CZUwZG+Bf776JIxs9qu8e/4KitxJw7MD6xUHcuYiK7QPFwtRH3PkG GGUw== X-Gm-Message-State: ANoB5pmBsIIxCIoIEYTkKf8JG6YPqFn4NEcyeGVOtTKG49hvkfB1hVsI udo//Zo8eXvmVTgWo517trgj2AxlI8eEcw== X-Received: by 2002:aa7:8c10:0:b0:554:7525:7acf with SMTP id c16-20020aa78c10000000b0055475257acfmr13245956pfd.44.1668419947997; Mon, 14 Nov 2022 01:59:07 -0800 (PST) Received: from localhost.localdomain ([240d:1a:cf7:5800:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id v11-20020a170902b7cb00b0017854cee6ebsm6983097plz.72.2022.11.14.01.59.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Nov 2022 01:59:07 -0800 (PST) From: Masahisa Kojima To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Masahisa Kojima Subject: [PATCH] eficonfig: fix missing variable initialization Date: Mon, 14 Nov 2022 19:00:47 +0900 Message-Id: <20221114100048.7041-1-masahisa.kojima@linaro.org> X-Mailer: git-send-email 2.17.1 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean 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 Reviewed-by: Ilias Apalodimas --- 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;