Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp280484pxh; Wed, 10 Nov 2021 01:34:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJy4nhH8Loyrp3Nh2txxSzfavCAYYsHNHNzegEKgMWGufBHUVD664rCBGcMfi4rIirWC2nOx X-Received: by 2002:a05:6e02:1b8a:: with SMTP id h10mr10142222ili.237.1636536859282; Wed, 10 Nov 2021 01:34:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636536859; cv=none; d=google.com; s=arc-20160816; b=uBk2ZzpN2KmJIw+9S7SN87HW8LiyO282ARgCV9ts26npHyyW6vBds4zC53FDCdzWFy 7iXR3OffNISCQ6D6LwOjoqF9u586XT3y4cSxZUbUYL9Sxx9pedlOugSPBTo1Kxf4lEic BtGeNbjUljW8pZUwjqw/qsLJmriDXctkOSrCW39/GBRosWYXNFrD/OqLK8Xg/0vh7+CH Qdsp/f2Cb6LrJGkbjPdz/GjwnaAF3hzBbUkvyH2sqmPVU8Ao7J5ezABG75OJsmBD7OSQ kfwFz/aHD5KV88VkDl8hi9VYhHiUVrkitxfMT6rnQww2Y/pLfH+DuXrdzBSKIIEZqg9y sMjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=QzZGyZsrbyzFE10YRbJraU4Wah2zLeksnaJsxkrrD+c=; b=QA9XEmFJbAHxuGUBjNoZFpWivE8GuSwreqSQCLBPTeAujID/juqMI6uxm5Hdh9pwti eQ/iX3XiSnm/XlgTQS7T9Mb4Wvo+8Mw2itwX9iuOqghqUjupiYX5lOedHpR/kzumPTbb 1+WiCyxAvrn2T9kbEHEaXaGMJy9CTTTte1/vSKZAVUNjj+NPej42vlK39q+XduIxGOBJ 47KiR870/QSpYtazbF2I+th4mAvBth/d1ywj5tAkyurI+DazW06utvGYI9GHOfEu0/RO iJWVCA49/ihhmnTCwfksmrI9EcNc8sIWuVXQDYr/Lwnn4ydDhEbl8+5A87QrbaOHRmpd RviQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-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 y9si34359787ilv.58.2021.11.10.01.33.19; Wed, 10 Nov 2021 01:34:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-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-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230475AbhKJJf5 (ORCPT + 99 others); Wed, 10 Nov 2021 04:35:57 -0500 Received: from smtp23.cstnet.cn ([159.226.251.23]:54504 "EHLO cstnet.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230456AbhKJJfz (ORCPT ); Wed, 10 Nov 2021 04:35:55 -0500 Received: from localhost.localdomain (unknown [124.16.141.244]) by APP-03 (Coremail) with SMTP id rQCowAC3v6u1kYthkxehBg--.395S2; Wed, 10 Nov 2021 17:32:38 +0800 (CST) From: Xu Wang To: trond.myklebust@hammerspace.com, anna.schumaker@netapp.com, bfields@fieldses.org, chuck.lever@oracle.com, davem@davemloft.net, kuba@kernel.org Cc: linux-nfs@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] sunrpc: Remove unneeded null check Date: Wed, 10 Nov 2021 09:32:17 +0000 Message-Id: <20211110093217.67301-1-vulab@iscas.ac.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: rQCowAC3v6u1kYthkxehBg--.395S2 X-Coremail-Antispam: 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46lvutnvoduhdfq/1tbiCgcBA1z4kHlyRAAAs0 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org In g_verify_token_header, the null check of 'ret' is unneeded to be done twice. Signed-off-by: Xu Wang --- net/sunrpc/auth_gss/gss_generic_token.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/net/sunrpc/auth_gss/gss_generic_token.c b/net/sunrpc/auth_gss/gss_generic_token.c index fe97f3106536..4a4082bb22ad 100644 --- a/net/sunrpc/auth_gss/gss_generic_token.c +++ b/net/sunrpc/auth_gss/gss_generic_token.c @@ -222,10 +222,8 @@ g_verify_token_header(struct xdr_netobj *mech, int *body_size, if (ret) return ret; - if (!ret) { - *buf_in = buf; - *body_size = toksize; - } + *buf_in = buf; + *body_size = toksize; return ret; } -- 2.25.1