aboutsummaryrefslogtreecommitdiff
path: root/net/sunrpc/auth_gss
diff options
context:
space:
mode:
authorXu Wang2021-11-10 09:32:17 +0000
committerAnna Schumaker2022-01-06 14:00:20 -0500
commit35e0f9a9af4869a4b1a3943da08d3a29ac6c4a42 (patch)
tree03aecdd3821a6bc58ac716c01413d1caedd65ef5 /net/sunrpc/auth_gss
parentc72a826829ccfb38019187a3a5ba6d3584b7b7dc (diff)
sunrpc: Remove unneeded null check
In g_verify_token_header, the null check of 'ret' is unneeded to be done twice. Signed-off-by: Xu Wang <vulab@iscas.ac.cn> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net/sunrpc/auth_gss')
-rw-r--r--net/sunrpc/auth_gss/gss_generic_token.c6
1 files 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;
}