From patchwork Wed Nov 10 09:32:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Wang X-Patchwork-Id: 12611649 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F2C6C433EF for ; Wed, 10 Nov 2021 09:33:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 78A306124D for ; Wed, 10 Nov 2021 09:33:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230475AbhKJJf5 (ORCPT ); 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 X-CM-TRANSID: rQCowAC3v6u1kYthkxehBg--.395S2 X-Coremail-Antispam: 1UD129KBjvdXoWrZw47AFWDuFykAry7KrWkCrg_yoW3Jrg_G3 9YvF4Dt3Z7CFZ8ur43J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.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; }