summaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
authorWei Yongjun <yjwei@cn.fujitsu.com>2009-06-25 10:35:44 +0200
committerJ. Bruce Fields <bfields@citi.umich.edu>2009-07-03 16:14:59 +0200
commit846d8e7cc82a6205d5c0a905a4940abd0f565741 (patch)
tree0d89d831c0e7a7979b404e7aaa9a0f76a2feb5d9 /net/sunrpc
parentLinux 2.6.31-rc1 (diff)
downloadlinux-846d8e7cc82a6205d5c0a905a4940abd0f565741.tar.xz
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.c4
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;