]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/infiniband/hw/mthca/mthca_mr.c
Merge branches 'release', 'idle', 'redhat-bugzilla-436589', 'sbs' and 'video' into...
[linux-2.6-omap-h63xx.git] / drivers / infiniband / hw / mthca / mthca_mr.c
index aa6c70a6a36f24c35fbfc3d7bff3b741a18f6cae..3538da16e3fe9ec4cea862fa7b0100fb3d3225c7 100644 (file)
@@ -613,8 +613,10 @@ int mthca_fmr_alloc(struct mthca_dev *dev, u32 pd,
                        sizeof *(mr->mem.tavor.mpt) * idx;
 
        mr->mtt = __mthca_alloc_mtt(dev, list_len, dev->mr_table.fmr_mtt_buddy);
-       if (IS_ERR(mr->mtt))
+       if (IS_ERR(mr->mtt)) {
+               err = PTR_ERR(mr->mtt);
                goto err_out_table;
+       }
 
        mtt_seg = mr->mtt->first_seg * MTHCA_MTT_SEG_SIZE;
 
@@ -627,8 +629,10 @@ int mthca_fmr_alloc(struct mthca_dev *dev, u32 pd,
                mr->mem.tavor.mtts = dev->mr_table.tavor_fmr.mtt_base + mtt_seg;
 
        mailbox = mthca_alloc_mailbox(dev, GFP_KERNEL);
-       if (IS_ERR(mailbox))
+       if (IS_ERR(mailbox)) {
+               err = PTR_ERR(mailbox);
                goto err_out_free_mtt;
+       }
 
        mpt_entry = mailbox->buf;
 
@@ -682,7 +686,7 @@ err_out_table:
        mthca_table_put(dev, dev->mr_table.mpt_table, key);
 
 err_out_mpt_free:
-       mthca_free(&dev->mr_table.mpt_alloc, mr->ibmr.lkey);
+       mthca_free(&dev->mr_table.mpt_alloc, key);
        return err;
 }