Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp491210ybg; Tue, 9 Jun 2020 06:02:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLF5i5Mp4ESjs1xw91Nt3pMXzQolQb0+qNumPxncgZSfp6zxRtqz3lwWYWjfBhyIrTNpU7 X-Received: by 2002:a50:a418:: with SMTP id u24mr27705731edb.141.1591707723310; Tue, 09 Jun 2020 06:02:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591707723; cv=none; d=google.com; s=arc-20160816; b=rwtI9bk7vZNwLUkNWFkz2IOrLQaCsnpMDC0wE0wbPlHvbAHUENafbSYbMo6ZS2wsrf 11BdhLRPfdSelRcQg4U5blMNfoO08PlGX3FHPdbUxZyGKi8gxLDKa+dHIWMLSZR75Py8 hMs3iuiTQRB/azuu5fnWXQNEoviutg3TeYFQbUpKdwUK6wMFTEhx7/94cpfBMoLJd5ft 9If/KPVAwZ7i03E+kOwrI2T4Yjwbxyp7SukauB1O7hlGhETDzA2i+Ra18Em5TaD9NnNG 3xSKNFTxNdavPjMCLGJrbFnPawDe4V6FqD41Hq1LQ7cROPUYaP/3LzDG1gshVcegIQXT yT3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=dWOjyg2HWOBfa0LewE6BLVogJ35gcxsItUIoLJoG8YM=; b=nJeBoJFCRLeN+/IvjgPTLAoD2tiEKyoSxkC4Ex6M1kPBOx55MWJG/sPFIVsAy9DwiF Orkju3UdlImce0zTo9lepckGBcYW/Ho1p08Q1VdurCGWeMK1ZBCUjY+KYU3FtHYPHLvT XBHxIDh9DcY5YS54eozjmUNqSel42ORwHNCMVjgMpX9p+Rk7fRJR6G7vFMRvYtGF2mDw 6w3CpHYrTdO/7/ZeLJ0btMZmxCVn8gXrL1Fpil7KeAxkSpus1UNS6IqGo+b7JnjABTPv ElxiNc5H0rzFdwz1f2+OEVVA5NovSQRrd8KbCIbhJz8FRGVF26BrLFLKswkP78IYhOKo 1Hzw== 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=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i4si11154051edq.200.2020.06.09.06.01.38; Tue, 09 Jun 2020 06:02:03 -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=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728189AbgFIMxv (ORCPT + 99 others); Tue, 9 Jun 2020 08:53:51 -0400 Received: from out30-54.freemail.mail.aliyun.com ([115.124.30.54]:50044 "EHLO out30-54.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726083AbgFIMxu (ORCPT ); Tue, 9 Jun 2020 08:53:50 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04407;MF=tianjia.zhang@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0U.4edQW_1591707214; Received: from localhost(mailfrom:tianjia.zhang@linux.alibaba.com fp:SMTPD_---0U.4edQW_1591707214) by smtp.aliyun-inc.com(127.0.0.1); Tue, 09 Jun 2020 20:53:35 +0800 From: Tianjia Zhang To: jmorris@namei.org, serge@hallyn.com, dhowells@redhat.com, nramas@linux.microsoft.com, tusharsu@linux.microsoft.com, zohar@linux.ibm.com Cc: linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, tianjia.zhang@linux.alibaba.com Subject: [PATCH] integrity: Remove redundant variable assignments Date: Tue, 9 Jun 2020 20:53:34 +0800 Message-Id: <20200609125334.15764-1-tianjia.zhang@linux.alibaba.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The local variable `ret` will be assigned when it is used for the first time, and assignment is not necessary when the variable is declared. Signed-off-by: Tianjia Zhang --- 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.17.1