diff options
author | Wei Yongjun <yjwei@cn.fujitsu.com> | 2009-06-25 16:35:44 +0800 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2009-07-03 10:14:59 -0400 |
commit | 846d8e7cc82a6205d5c0a905a4940abd0f565741 (patch) | |
tree | 0d89d831c0e7a7979b404e7aaa9a0f76a2feb5d9 /net/sunrpc | |
parent | 28d0325ce6e0a52f53d8af687e6427fee59004d3 (diff) | |
download | linux-846d8e7cc82a6205d5c0a905a4940abd0f565741.tar.gz linux-846d8e7cc82a6205d5c0a905a4940abd0f565741.tar.bz2 linux-846d8e7cc82a6205d5c0a905a4940abd0f565741.zip |
svcrdma: fix error handling of rdma_alloc_frmr()
ib_alloc_fast_reg_mr() and ib_alloc_fast_reg_page_list() returns
ERR_PTR() and not NULL. Compile tested only.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma_transport.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c index 5151f9f6c573..0cf5e8c27a10 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c @@ -730,12 +730,12 @@ static struct svc_rdma_fastreg_mr *rdma_alloc_frmr(struct svcxprt_rdma *xprt) goto err; mr = ib_alloc_fast_reg_mr(xprt->sc_pd, RPCSVC_MAXPAGES); - if (!mr) + if (IS_ERR(mr)) goto err_free_frmr; pl = ib_alloc_fast_reg_page_list(xprt->sc_cm_id->device, RPCSVC_MAXPAGES); - if (!pl) + if (IS_ERR(pl)) goto err_free_mr; frmr->mr = mr; |