From patchwork Tue Apr 23 05:38:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 791229 Delivered-To: patch@linaro.org Received: by 2002:a5d:4884:0:b0:346:15ad:a2a with SMTP id g4csp164557wrq; Mon, 22 Apr 2024 22:45:34 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUZ355EVLOMbJ8hF/enr0O/9f2dUchUwVlktCSR8cy8T8Uw7Pi6MiuOp7fa3ojXGHEOWC8rbph9X7gFSWMIab+X X-Google-Smtp-Source: AGHT+IFakXzhTcyIzmtrEuumuYG+Xb6T3phTTip6u+PWeu/OKFSB4Qn+As1T4pGcSQIm5bYQUnES X-Received: by 2002:adf:f141:0:b0:34a:9adc:aa24 with SMTP id y1-20020adff141000000b0034a9adcaa24mr977010wro.15.1713851134580; Mon, 22 Apr 2024 22:45:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713851134; cv=none; d=google.com; s=arc-20160816; b=JMcsPT2eq5oRUxaIWmCV5vmQuIs7/6rLGTfAA0xCJVy8OVkH+7l3NyUYz8M6Zzjx4u 1jeBbtd51ZEpwh1VU+NaCgFRvN7yOCDEBbx9PEE1GMGJobJCqRuu1BZ9D8ozLDug29Lc Nwv4Cwz6tgLIez41eHXeetSHd74oz2hCVcYAvzqQRoK4dMYTDu032ZJOgguFzZjMHL27 WA3L7LYv+1MEGVHiIbhyqsp1kt25W6K7txC3ge8iLHKgvVFsj0jC1QzIPiZAvK5ftBKJ vUK65DiYkXqM5TEwxIXsAoCx/Oef5W5fHqRYL2rnIJQOfLejHAPDD+ixtbbtw2oodfqK IW2w== 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:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=rIeB/7QFIWfUQxg22uoQKSDBKf+OQquWJF3Ka+5LAOM=; fh=0YeeO0NOVzpg1RMW6wiUMve4jFMq0UpJzFhQN3d3rL8=; b=Homh7twq8ZGereap/NjsPryzX1a6RS6HwtEKpd/e95TSIWmfLx87RUzfjdJgvvK9YH m8IyT48+omZfArN469jbQJ933SkdDQQU8Tgu9Mspo4B091NlQbMNQe/T15q4UeZpCgbX peTecTBlqg2ncGsHcT0Ac9KLb/DYQV5C5QVZ4smhlVO91/t0tgIWR5KFzj0kwuWVh6KL 7n7NRdKsaVZU/n/+42i79NzivXL8oquLU3vx4zY66cid6WGt5cdksEnyjI1L+XLfz0kW BTlYYklT2YC4/KSPkyh/QWiW5I6BXpxdZkqxlD3VKUbH+CDcP1GlHg891FKNQfYV+17f zbNw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uIw8fTpl; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id u11-20020adfeb4b000000b00343dd0dc049si5684611wrn.1057.2024.04.22.22.45.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 22:45:34 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uIw8fTpl; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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 54E0988594; Tue, 23 Apr 2024 07:45:33 +0200 (CEST) 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="uIw8fTpl"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 551BA88599; Tue, 23 Apr 2024 07:45:32 +0200 (CEST) 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-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) (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 138778858B for ; Tue, 23 Apr 2024 07:45:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2dae975d0dcso62751291fa.1 for ; Mon, 22 Apr 2024 22:45:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713851129; x=1714455929; darn=lists.denx.de; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=rIeB/7QFIWfUQxg22uoQKSDBKf+OQquWJF3Ka+5LAOM=; b=uIw8fTplbq/KCWP6YP5abUHc4zYQLNqxJMeB0ro5nvb7ZTVAGZg4MyrOp/qekHdrcW 5tUABK/bDfHO6HSl7Lnd+fgsRhE7Lsh59QBSZoXKVwuDUqTnE6AMO+eCTK6lcHvRod8g 26Fhe6iL6mJkJWbeuDxWhw1atHpBp+tZ/x+Z6R6c2TXnNhVbY33vnaEb6I86Nd6H2Iz2 EToXX+t00dVmdxPzD3GsEEzL5beWueAqEbiHp0wyxCJo5oK7DsFSXIewpsdJ3gAAGKkn sB3Mffbh/SMGjDpQKP84YVnwDUZsZ/9QSsh+LE7NtmHDLt7X/VeqxVWO7Eopu9AJW8XY 5qMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713851129; x=1714455929; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=rIeB/7QFIWfUQxg22uoQKSDBKf+OQquWJF3Ka+5LAOM=; b=HU+y8+1DTH0NOd/SFqdlkPPeCE9+Ap4ICD8auYdo9nx5Z4m6CpL6AvcnSW/ynDvjis LxrTuaOdYCBSLbm5lq3Y1rhkfyIJArXLwjgBuEqDc3dw5NifyxsOAt/+dIDGpu3ZcnVN TDGg6EiEk3MHSulROnr7VKuf7DnVIEO/+XJVVzsmHVTlKsHM+8gTHgPJa2HyFdiLBmPw a5gCmw6d0E7pZSfXBm65O49IC2grmhIUAmv1q/LEmDdFl0INmJ/8xTkyvMO8M+ALZgCN H/b/CdlKsfVqXmgoFQ+1uUqfDQvwxnjIIXjrwuG+XpgsiDi2VVXOO7OINt46oZf3CoOv v5Sg== X-Forwarded-Encrypted: i=1; AJvYcCU+CRSIWuA9Txs0jFK4QyTue5VuWDnTkJOn7vQCyKc1denB5YUXe7jHtYYsdn3z9hqvwNjKqT88Kj26x3Qf7fEGY4i5Ow== X-Gm-Message-State: AOJu0Yxv1/htXPqaP93NNGzModhWb9II8wilAniwcEq7qitZb7pOdqoO 3u2gmZYovb8rGkLOxtsaYebNiWFX804Eww4xMGyuDwzm/LnihT9Wfx3Lq7yk5rVh9Das4938sqG kYBc= X-Received: by 2002:a05:6402:3494:b0:572:145a:77d1 with SMTP id v20-20020a056402349400b00572145a77d1mr2029494edc.14.1713850697000; Mon, 22 Apr 2024 22:38:17 -0700 (PDT) Received: from localhost.localdomain (ppp089210108048.access.hol.gr. [89.210.108.48]) by smtp.gmail.com with ESMTPSA id i19-20020a50fc13000000b0056fed8e7817sm6138188edr.20.2024.04.22.22.38.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 22:38:11 -0700 (PDT) From: Ilias Apalodimas To: heinrich.schuchardt@canonical.com Cc: Ilias Apalodimas , Heinrich Schuchardt , Tom Rini , Alper Nebi Yasak , Simon Glass , u-boot@lists.denx.de Subject: [PATCH] efi_loader: address coverity report 492766 for dead code Date: Tue, 23 Apr 2024 08:38:06 +0300 Message-ID: <20240423053806.4962-1-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean The check of the return code is already done a few lines above. Although it doesn't cause any functional issues, remove the superfluous checks Addresses-Coverity-ID: 492766 Control flow issues (DEADCODE) Signed-off-by: Ilias Apalodimas Reviewed-by: Heinrich Schuchardt --- lib/efi_loader/efi_var_mem.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/efi_loader/efi_var_mem.c b/lib/efi_loader/efi_var_mem.c index 940ab6638823..139e16aad7c6 100644 --- a/lib/efi_loader/efi_var_mem.c +++ b/lib/efi_loader/efi_var_mem.c @@ -232,8 +232,6 @@ efi_status_t efi_var_mem_init(void) efi_var_buf->length = (uintptr_t)efi_var_buf->var - (uintptr_t)efi_var_buf; - if (ret != EFI_SUCCESS) - return ret; ret = efi_create_event(EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE, TPL_CALLBACK, efi_var_mem_notify_virtual_address_map, NULL, NULL, &event);