[patch]xprt: remove redundant null check

From: j223yang
Date: Thu Mar 10 2011 - 12:40:36 EST


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

Signed-off-by: Jinqiu Yang<crindy646@xxxxxxxxx>
---
xprt.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--- a/net/sunrpc/xprt.c 2011-03-10 11:20:16.408039185 -0500
+++ b/net/sunrpc/xprt.c 2011-03-10 11:32:28.132164761 -0500
@@ -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:
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/