Commit 344d4be0 authored by Dan Carpenter's avatar Dan Carpenter Committed by Kleber Sacilotto de Souza

xprtrdma: checking for NULL instead of IS_ERR()

BugLink: https://bugs.launchpad.net/bugs/1878232

commit abfb6897 upstream.

The rpcrdma_create_req() function returns error pointers or success.  It
never returns NULL.

Fixes: f531a5db ('xprtrdma: Pre-allocate backward rpc_rqst and send/receive buffers')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarIan May <ian.may@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent ae94a379
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment