aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mthca
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@mellanox.co.il>2005-04-16 18:26:19 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:26:19 -0400
commit55645e9b0ae202f9bd58e68eb141d7594163935f (patch)
treec47d89fa3fdac4efcd3a71535f08f09f68370f86 /drivers/infiniband/hw/mthca
parent85665c9816a2b38866e03c019bf5c2e47eb9fb04 (diff)
[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 <mst@mellanox.co.il> Signed-off-by: Roland Dreier <roland@topspin.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/infiniband/hw/mthca')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_mr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_mr.c b/drivers/infiniband/hw/mthca/mthca_mr.c
index 5eb6e07f35bb..66656379ea7b 100644
--- a/drivers/infiniband/hw/mthca/mthca_mr.c
+++ b/drivers/infiniband/hw/mthca/mthca_mr.c
@@ -231,7 +231,7 @@ err_out_table:
231 mthca_table_put(dev, dev->mr_table.mpt_table, key); 231 mthca_table_put(dev, dev->mr_table.mpt_table, key);
232 232
233err_out_mpt_free: 233err_out_mpt_free:
234 mthca_free(&dev->mr_table.mpt_alloc, mr->ibmr.lkey); 234 mthca_free(&dev->mr_table.mpt_alloc, key);
235 kfree(mailbox); 235 kfree(mailbox);
236 return err; 236 return err;
237} 237}
@@ -368,7 +368,7 @@ err_out_table:
368 mthca_table_put(dev, dev->mr_table.mpt_table, key); 368 mthca_table_put(dev, dev->mr_table.mpt_table, key);
369 369
370err_out_mpt_free: 370err_out_mpt_free:
371 mthca_free(&dev->mr_table.mpt_alloc, mr->ibmr.lkey); 371 mthca_free(&dev->mr_table.mpt_alloc, key);
372 return err; 372 return err;
373} 373}
374 374