Skip to content

Commit

Permalink
xprt: remove redundant null check
Browse files Browse the repository at this point in the history
'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>
  • Loading branch information
j223yang@asset.uwaterloo.ca authored and Trond Myklebust committed Mar 16, 2011
1 parent 8f68cd4 commit 4d4a76f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions net/sunrpc/xprt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 4d4a76f

Please sign in to comment.