xprt: remove redundant null check
Subsystems (3)
PATCH 1/1 xprt: remove redundant null check
'req' is dereferenced before checked for NULL.
The patch simply removes the check.
Signed-off-by Jinqiu Yang<[email protected]>
--- 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: