Received: by 2002:a17:90b:8d0:0:0:0:0 with SMTP id ds16csp5070845pjb; Mon, 27 Jul 2020 12:09:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoKxaRlmExfOsVmh/zE4rmQOPrELzs8A08UwwFSW2mH4V89PhotNOURCZ0Ubh6DQ48m9cv X-Received: by 2002:a17:906:13c4:: with SMTP id g4mr16606410ejc.131.1595876976072; Mon, 27 Jul 2020 12:09:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595876976; cv=none; d=google.com; s=arc-20160816; b=cj0KfhlN3Z9YAGLz7YfI6KqyUK5ElJQQ9b23Cf3mZUazYTv2R8OFfrgXdP3oQXjsI6 G7j+Yk0ulPVrxXnC0V6ZmY67gOO+UEBPVTbD02A+T1qh/yMuZGuy0ZIbAFC/eZLibfzr xnztIYFlSvfT7WEyUyp1QM1yRrlYEEkNikQIxhpm7a7wHcCGCXwBdhopM9VuxMZWXs6S NiLuH60Dx6I5w6ijmytf/t0mYTRlQQ+4BUzPTv3GJTum+VMGl5nHwrPyabFDGPg4QktO lQ0p806i2lqJSqXvNjNdwUdL/ipWhj5jlD2gttSOqFnTqhUt0sYhC6LfOpmEeKVy1dNf UGsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=cQhETcyDZWRUdi4UEQlxew8qCnQ+tfVcSYRKTHL7ocg=; b=yBBN56dI8LLLX32rr+iyRGDXYE6Mkj9BNbycAeQcU9g77YEYHm0P5eQOVgLOwZjVU8 Zjuio5sb5Wf8mlFEPmF8zTPvaSahMlHdPH5yWg3lBEgjamk5j9o5YOZC9z4dj8mNGcVc cZgDT3V8NgOOSE1fBRlyiJteKRdoul1MJy6CPS8as+7jLJRKSzf4WRIj7xoiOeLMavEt eKsQpXeaxN4n1Ph1hmxUnzBpP7LVgdRzr+qDrR9IB1TdpRy3gKEIqVsTTpBlqUIYzKBq ebIq7LVYDWw45vLqw82o29Q8bnIC99Hey+NUSOZnBgRchpQpcl8V5nuT7WWOONKuKM6B W8rg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p90si6025613edd.468.2020.07.27.12.09.13; Mon, 27 Jul 2020 12:09:36 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730123AbgG0SGH (ORCPT + 99 others); Mon, 27 Jul 2020 14:06:07 -0400 Received: from namei.org ([65.99.196.166]:55630 "EHLO namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728545AbgG0SGH (ORCPT ); Mon, 27 Jul 2020 14:06:07 -0400 Received: from localhost (localhost [127.0.0.1]) by namei.org (8.14.4/8.14.4) with ESMTP id 06RI5sx8020079; Mon, 27 Jul 2020 18:05:54 GMT Date: Tue, 28 Jul 2020 04:05:54 +1000 (AEST) From: James Morris To: Colin King , Mimi Zohar cc: "Serge E . Hallyn" , linux-security-module@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] integrity: remove redundant initialization of variable ret In-Reply-To: <20200701134634.549399-1-colin.king@canonical.com> Message-ID: References: <20200701134634.549399-1-colin.king@canonical.com> User-Agent: Alpine 2.21 (LRH 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- James Morris