[openib-general] [PATCH] mthca_mr error handling
Michael S. Tsirkin
mst at mellanox.co.il
Thu Mar 17 10:01:10 PST 2005
Fix error handling in mr allocation for arbel native:
mthca_free must get an mr index, not a key.
Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>
Index: hw/mthca/mthca_mr.c
===================================================================
--- hw/mthca/mthca_mr.c (revision 2012)
+++ hw/mthca/mthca_mr.c (working copy)
@@ -231,7 +231,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);
kfree(mailbox);
return err;
}
@@ -368,7 +368,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;
}
--
MST - Michael S. Tsirkin
More information about the general
mailing list