tree 333dbd1ab1923eb137f8d915cb697d3c689316f3
parent 2e53c3b930b887e88351694dc731e9d4ffaabdcf
author Michael S. Tsirkin <[EMAIL PROTECTED]> Tue Apr 12 08:26:46 2005
committer Linus Torvalds <[EMAIL PROTECTED]> Tue Apr 12 08:26:46 2005

[PATCH] IB/mthca: fix MR allocation error path

Fix error handling in MR allocation for mem-free mode: mthca_free must get an
MR index, not a key.

Signed-off-by: Michael S. Tsirkin <[EMAIL PROTECTED]>
Signed-off-by: Roland Dreier <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 mthca_mr.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Index: drivers/infiniband/hw/mthca/mthca_mr.c
===================================================================
--- 
80a7695578c0e9adf96996a46f6ea3633e31f8a7/drivers/infiniband/hw/mthca/mthca_mr.c 
 (mode:100644 sha1:b42fabbce0157aa3f79212d0bba6e54a862cf253)
+++ 
333dbd1ab1923eb137f8d915cb697d3c689316f3/drivers/infiniband/hw/mthca/mthca_mr.c 
 (mode:100644 sha1:6603168b5bfce4d42769c4b849148aa8e6f00005)
@@ -231,7 +231,7 @@
                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);
        kfree(mailbox);
        return err;
 }
@@ -368,7 +368,7 @@
                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;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to