aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorj223yang@asset.uwaterloo.ca <j223yang@asset.uwaterloo.ca>2011-03-10 12:40:28 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2011-03-15 20:16:14 -0400
commit4d4a76f3309edc671918a767b336492fbc80a16d (patch)
treed35e5df0599c095c69bbcae6b5a3207623da07a0 /net
parent8f68cd42d85f31fb58dd2cabf3ff4aad0a2bafd9 (diff)
downloadkernel_samsung_espresso10-4d4a76f3309edc671918a767b336492fbc80a16d.zip
kernel_samsung_espresso10-4d4a76f3309edc671918a767b336492fbc80a16d.tar.gz
kernel_samsung_espresso10-4d4a76f3309edc671918a767b336492fbc80a16d.tar.bz2
xprt: remove redundant null check
'req' is dereferenced before checked for NULL. The patch simply removes the check. Signed-off-by: Jinqiu Yang<crindy646@gmail.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net')
-rw-r--r--net/sunrpc/xprt.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index 856274d..8bdcdbe 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -202,10 +202,9 @@ int xprt_reserve_xprt(struct rpc_task *task)
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: