提交 b635fa21 编写于 作者: R Roland Dreier 提交者: Linus Torvalds

[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: NRoland Dreier <roland@topspin.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 4ad81174
......@@ -817,10 +817,12 @@ int mthca_init_cq(struct mthca_dev *dev, int nent,
err_out_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:
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:
mthca_table_put(dev, dev->cq_table.table, cq->cqn);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册