mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 21:21:41 +00:00
[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>
This commit is contained in:
parent
85665c9816
commit
55645e9b0a
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user