mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-10-04 08:02:24 +00:00
[PATCH] IB/mthca: only free doorbell records in mem-free mode
On error path, only free doorbell records if we're in mem-free mode. 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
4ad81174ed
commit
b635fa2151
@ -817,10 +817,12 @@ int mthca_init_cq(struct mthca_dev *dev, int nent,
|
|||||||
err_out_mailbox:
|
err_out_mailbox:
|
||||||
kfree(mailbox);
|
kfree(mailbox);
|
||||||
|
|
||||||
mthca_free_db(dev, MTHCA_DB_TYPE_CQ_ARM, cq->arm_db_index);
|
if (dev->hca_type == ARBEL_NATIVE)
|
||||||
|
mthca_free_db(dev, MTHCA_DB_TYPE_CQ_ARM, cq->arm_db_index);
|
||||||
|
|
||||||
err_out_ci:
|
err_out_ci:
|
||||||
mthca_free_db(dev, MTHCA_DB_TYPE_CQ_SET_CI, cq->set_ci_db_index);
|
if (dev->hca_type == ARBEL_NATIVE)
|
||||||
|
mthca_free_db(dev, MTHCA_DB_TYPE_CQ_SET_CI, cq->set_ci_db_index);
|
||||||
|
|
||||||
err_out_icm:
|
err_out_icm:
|
||||||
mthca_table_put(dev, dev->cq_table.table, cq->cqn);
|
mthca_table_put(dev, dev->cq_table.table, cq->cqn);
|
||||||
|
Loading…
Reference in New Issue
Block a user