Skip to contentSkip to conversation

sunrpc: Remove unneeded null check

PATCH New Xu Wang 1 participant 1 message Nov 10, 2021

Subsystems (4)
lore
Share & tools
lore

Xu Wang

author
#0 lore raw

PATCH 1/1 sunrpc: Remove unneeded null check

In g_verify_token_header, the null check of 'ret'
is unneeded to be done twice.

---
 net/sunrpc/auth_gss/gss_generic_token.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
net/sunrpc/auth_gss/gss_generic_token.c +2 -4
index fe97f3106536..4a4082bb22ad 100644
@@ -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;
 }
Signature · 1 line
2.25.1