aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/infiniband/hw/mthca/mthca_mr.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_mr.c b/drivers/infiniband/hw/mthca/mthca_mr.c
index aa6c70a6a36f..3b6985557cb2 100644
--- a/drivers/infiniband/hw/mthca/mthca_mr.c
+++ b/drivers/infiniband/hw/mthca/mthca_mr.c
@@ -613,8 +613,10 @@ int mthca_fmr_alloc(struct mthca_dev *dev, u32 pd,
613 sizeof *(mr->mem.tavor.mpt) * idx; 613 sizeof *(mr->mem.tavor.mpt) * idx;
614 614
615 mr->mtt = __mthca_alloc_mtt(dev, list_len, dev->mr_table.fmr_mtt_buddy); 615 mr->mtt = __mthca_alloc_mtt(dev, list_len, dev->mr_table.fmr_mtt_buddy);
616 if (IS_ERR(mr->mtt)) 616 if (IS_ERR(mr->mtt)) {
617 err = PTR_ERR(mr->mtt);
617 goto err_out_table; 618 goto err_out_table;
619 }
618 620
619 mtt_seg = mr->mtt->first_seg * MTHCA_MTT_SEG_SIZE; 621 mtt_seg = mr->mtt->first_seg * MTHCA_MTT_SEG_SIZE;
620 622
@@ -627,8 +629,10 @@ int mthca_fmr_alloc(struct mthca_dev *dev, u32 pd,
627 mr->mem.tavor.mtts = dev->mr_table.tavor_fmr.mtt_base + mtt_seg; 629 mr->mem.tavor.mtts = dev->mr_table.tavor_fmr.mtt_base + mtt_seg;
628 630
629 mailbox = mthca_alloc_mailbox(dev, GFP_KERNEL); 631 mailbox = mthca_alloc_mailbox(dev, GFP_KERNEL);
630 if (IS_ERR(mailbox)) 632 if (IS_ERR(mailbox)) {
633 err = PTR_ERR(mailbox);
631 goto err_out_free_mtt; 634 goto err_out_free_mtt;
635 }
632 636
633 mpt_entry = mailbox->buf; 637 mpt_entry = mailbox->buf;
634 638