aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/cxgb4/mem.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/cxgb4/mem.c')
-rw-r--r--drivers/infiniband/hw/cxgb4/mem.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/cxgb4/mem.c b/drivers/infiniband/hw/cxgb4/mem.c
index e54ff6d25691..993ed1fe7bf6 100644
--- a/drivers/infiniband/hw/cxgb4/mem.c
+++ b/drivers/infiniband/hw/cxgb4/mem.c
@@ -712,8 +712,10 @@ struct ib_mr *c4iw_alloc_fast_reg_mr(struct ib_pd *pd, int pbl_depth)
712 php = to_c4iw_pd(pd); 712 php = to_c4iw_pd(pd);
713 rhp = php->rhp; 713 rhp = php->rhp;
714 mhp = kzalloc(sizeof(*mhp), GFP_KERNEL); 714 mhp = kzalloc(sizeof(*mhp), GFP_KERNEL);
715 if (!mhp) 715 if (!mhp) {
716 ret = -ENOMEM;
716 goto err; 717 goto err;
718 }
717 719
718 mhp->rhp = rhp; 720 mhp->rhp = rhp;
719 ret = alloc_pbl(mhp, pbl_depth); 721 ret = alloc_pbl(mhp, pbl_depth);
@@ -730,8 +732,10 @@ struct ib_mr *c4iw_alloc_fast_reg_mr(struct ib_pd *pd, int pbl_depth)
730 mhp->attr.state = 1; 732 mhp->attr.state = 1;
731 mmid = (stag) >> 8; 733 mmid = (stag) >> 8;
732 mhp->ibmr.rkey = mhp->ibmr.lkey = stag; 734 mhp->ibmr.rkey = mhp->ibmr.lkey = stag;
733 if (insert_handle(rhp, &rhp->mmidr, mhp, mmid)) 735 if (insert_handle(rhp, &rhp->mmidr, mhp, mmid)) {
736 ret = -ENOMEM;
734 goto err3; 737 goto err3;
738 }
735 739
736 PDBG("%s mmid 0x%x mhp %p stag 0x%x\n", __func__, mmid, mhp, stag); 740 PDBG("%s mmid 0x%x mhp %p stag 0x%x\n", __func__, mmid, mhp, stag);
737 return &(mhp->ibmr); 741 return &(mhp->ibmr);