Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp8046ybg; Mon, 27 Jul 2020 13:59:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWUwtWnBxBMYg4smzS+G+IXqZLPcTY7bN61VZfEImUz6YOazXneBqfBcRhgeqVe+ye3QUM X-Received: by 2002:a17:906:3050:: with SMTP id d16mr8708566ejd.12.1595883550592; Mon, 27 Jul 2020 13:59:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595883550; cv=none; d=google.com; s=arc-20160816; b=dyKF00sNXkskTinbzNDBVzTXWr43GJ/tNa5OldD9MnJ2juHWgn2Onj5jGjsExANpQA utwzyK+ci7vFaAlSY4sLKQH3SJ7JoplzKiW10bR4uax6tma8Obu6z1bbacfmaIfB7j4A 96pSPJSQM8k/a7+k/UNC6rKVlA5yD25cixwenYCJLS21uWeH6kWFvnqZW5ZY2p8WcEb8 qRs5Wk0Zgy1NrYntt11J4YZB0eWPo82A88nhy1lsW6qw+4b4O1L6o29zkKbbYRqNZKqY h49z5o2R9tzm8YWvmaE/yxiUsgkZcMC2VHx2vOgPIgx7r+4UNns5WndvBT1iH5sk8fV1 QG2g== 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 :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=bVXfpwJWlekJZ4+VAplyuzLTCOivSnLU7SsmW0yAbbw=; b=BSGxPb6pxNi5W71lrG6n8EE5FJPQNjuTSyHgVJi9+0AX4wzS0P9Qe63MBGpSAipEvI OwM1i4YYpGH+08/PBF0uTFIxXEH7qFKWoVYUdtXv3fedlL+QVMj/bMVPNaFL2IOR7qK4 yZstNmncZtAhxYpXUzndm5q9znx3r6AI2RQUxlvdcx1XbVtf/1qyRm6Wpqd+pbzx+Rat 0pBjPhfv/mPOzcQ/ZhV2G39rGvr7E4Q7eWIf65bBju1bpGXoehYrYRu0kOHLcKRh4WYD NhhsGMecdl+jw5NVT2/h8E6ftBjLXQdeJY7TLvFx1vJO5xju/x+xK/LL8t6gZDKP05N1 8Hvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RujnX9ZJ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j8si4676855ejy.610.2020.07.27.13.58.48; Mon, 27 Jul 2020 13:59:10 -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; dkim=pass header.i=@kernel.org header.s=default header.b=RujnX9ZJ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726738AbgG0U56 (ORCPT + 99 others); Mon, 27 Jul 2020 16:57:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:37432 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726171AbgG0U56 (ORCPT ); Mon, 27 Jul 2020 16:57:58 -0400 Received: from localhost.localdomain (pool-96-246-152-186.nycmny.fios.verizon.net [96.246.152.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6C0CB20838; Mon, 27 Jul 2020 20:57:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595883478; bh=AMSN2ecQFesrryvC8lvOnbL7UBWDRobz8cXhfmoQXb4=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=RujnX9ZJola97Aga2AvExn0NHQBjg3drtWr/XHQ6jZ4Bc0og1CnxHQfuWQNuS6ZaG JykataoGGPIl4l3hzdUZ/nqn255YvbgpeBbATvi+1N37QOjEb2XDMSURl2RnFLNU4j eK98wqwZzlZwjr+FlyqNL7dT0Ix0TCYJ6eeykoZ0= Message-ID: <1595883476.4841.167.camel@kernel.org> Subject: Re: [PATCH] integrity: remove redundant initialization of variable ret From: Mimi Zohar To: James Morris , Colin King , Mimi Zohar Cc: "Serge E . Hallyn" , linux-security-module@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 27 Jul 2020 16:57:56 -0400 In-Reply-To: References: <20200701134634.549399-1-colin.king@canonical.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.5 (3.20.5-1.fc24) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2020-07-28 at 04:05 +1000, James Morris wrote: > On Wed, 1 Jul 2020, Colin King wrote: > > > 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; > > Assuming Mimi will grab this. > > > Acked-by: James Morris Yes, thank you for the reminder. Mimi