Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp639903ybt; Wed, 1 Jul 2020 06:49:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCgpt1qIwf1slZ9kYLXflPl2Ku7XfeOpVS93M/pAgjj/gqai/zveL3qtTRzFUgawEn6+lJ X-Received: by 2002:a05:6402:16c7:: with SMTP id r7mr10798670edx.288.1593611354479; Wed, 01 Jul 2020 06:49:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593611354; cv=none; d=google.com; s=arc-20160816; b=gLWy/V9RTdlUSlPd+mAK4wXr6UCcJbQJXknoNwprvmMwG8v11kOnSswoVDu/a/30jN 3hUrShM6F7njyOadTZdQUXPVnf3jLkx0k0/wuN1xb/CrLLvbdzoyDoXZXuNVno2K2Itj pMMVGB99FKA4PNc9xjKl79KRRMUXVa993JFSrcSiNFIufgscG7rRYOohSK3i2trjmT4K i03rO5mHqe+iDMt4wdmnd3TFLPeU0B8zvZfC2f/wJJVsRq1URgoPU05mhQFeRxSPALPM BeIz3Dc3OgzfjBu0NYgPKP7+DASaPRixUuol5nEe9o/fUozGw30cIDbNHH0aB3MvFw8w VL1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=VSCCtyyGZgI75mB5QeZHNFyZzEzw/kQFRjdcCyy/IAQ=; b=P5brNRPqpf0rsG6dXjAXz/+dGsXrrTPb6iUiIbUH5c0+FZH5sR8YNvmNWN8w7cPJF6 lhmExNdcVJbQkvT7NczQ3mYEKdGwqQ142kkFNZB2ECTnrsBU83VaHqIi44p5MyT9/rQY erlURz/ZlZVJ6/ybJOol1SVXFL5sNkZu05UbmqD9BIORE3wvOr3BNehHaVr95vndXAFs ZDt5JcppX08I8GCocx+0ufrG/jCmxp0pVi8Q72aT2B5fCIqKGeaPvvFWEeo3gTqSdyGf WAIy1U5MP2haY5bdZY2CmqLUg71WeVbbUjDVETkgFvpK3uimYai8xb4hqLNx0ht4jjav 7Mbw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j16si3885285eds.309.2020.07.01.06.48.51; Wed, 01 Jul 2020 06:49:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731240AbgGANqi (ORCPT + 99 others); Wed, 1 Jul 2020 09:46:38 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:60748 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729503AbgGANqi (ORCPT ); Wed, 1 Jul 2020 09:46:38 -0400 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jqd4M-0001xc-W8; Wed, 01 Jul 2020 13:46:35 +0000 From: Colin King To: James Morris , "Serge E . Hallyn" , linux-security-module@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] integrity: remove redundant initialization of variable ret Date: Wed, 1 Jul 2020 14:46:34 +0100 Message-Id: <20200701134634.549399-1-colin.king@canonical.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King The variable ret is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- security/integrity/digsig_asymmetric.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/integrity/digsig_asymmetric.c b/security/integrity/digsig_asymmetric.c index 4e0d6778277e..cfa4127d0518 100644 --- a/security/integrity/digsig_asymmetric.c +++ b/security/integrity/digsig_asymmetric.c @@ -79,7 +79,7 @@ int asymmetric_verify(struct key *keyring, const char *sig, struct public_key_signature pks; struct signature_v2_hdr *hdr = (struct signature_v2_hdr *)sig; struct key *key; - int ret = -ENOMEM; + int ret; if (siglen <= sizeof(*hdr)) return -EBADMSG; -- 2.27.0