Skip to content

Commit

Permalink
[PATCH] IB/mthca: only free doorbell records in mem-free mode
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roland Dreier authored and Linus Torvalds committed Apr 16, 2005
1 parent 4ad8117 commit b635fa2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/infiniband/hw/mthca/mthca_cq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b635fa2

Please sign in to comment.