Skip to content

Commit

Permalink
xprtrdma: checking for NULL instead of IS_ERR()
Browse files Browse the repository at this point in the history
The rpcrdma_create_req() function returns error pointers or success.  It
never returns NULL.

Fixes: f531a5d ('xprtrdma: Pre-allocate backward rpc_rqst and send/receive buffers')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
  • Loading branch information
Dan Carpenter authored and Anna Schumaker committed Dec 18, 2015
1 parent 38b95bc commit abfb689
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/sunrpc/xprtrdma/backchannel.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ static int rpcrdma_bc_setup_rqst(struct rpcrdma_xprt *r_xprt,
size_t size;

req = rpcrdma_create_req(r_xprt);
if (!req)
return -ENOMEM;
if (IS_ERR(req))
return PTR_ERR(req);
req->rl_backchannel = true;

size = RPCRDMA_INLINE_WRITE_THRESHOLD(rqst);
Expand Down

0 comments on commit abfb689

Please sign in to comment.