diff --git a/drivers/infiniband/hw/mthca/mthca_cq.c b/drivers/infiniband/hw/mthca/mthca_cq.c index 5dead2df7eb068eaa63dd3f67a91e9ce8e21ef00..8b3ffd23e50527303ac4cbdad3db2c50c9a89702 100644 --- a/drivers/infiniband/hw/mthca/mthca_cq.c +++ b/drivers/infiniband/hw/mthca/mthca_cq.c @@ -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);