Skip to contentSkip to conversation

xprt: remove redundant null check

PATCH New [email protected] 1 participant 1 message Mar 10, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xprt: remove redundant null check

'req' is dereferenced before checked for NULL.
The patch simply removes the check.

---
 xprt.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
net/sunrpc/xprt.c +3 -4
@@ -202,10 +202,9 @@ int xprt_reserve_xprt(struct rpc_task *t
 		goto out_sleep;
 	}
 	xprt->snd_task = task;
-	if (req) {
-		req->rq_bytes_sent = 0;
-		req->rq_ntrans++;
-	}
+	req->rq_bytes_sent = 0;
+	req->rq_ntrans++;
+
 	return 1;
 
 out_sleep: