Skip to content

Commit

Permalink
svcrdma: fix error handling of rdma_alloc_frmr()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and J. Bruce Fields committed Jul 3, 2009
1 parent 28d0325 commit 846d8e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/sunrpc/xprtrdma/svc_rdma_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 846d8e7

Please sign in to comment.