aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mthca/mthca_qp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_qp.c')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_qp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c
index 71dc84bd4254..1c6b63aca268 100644
--- a/drivers/infiniband/hw/mthca/mthca_qp.c
+++ b/drivers/infiniband/hw/mthca/mthca_qp.c
@@ -1088,21 +1088,21 @@ static void mthca_unmap_memfree(struct mthca_dev *dev,
1088static int mthca_alloc_memfree(struct mthca_dev *dev, 1088static int mthca_alloc_memfree(struct mthca_dev *dev,
1089 struct mthca_qp *qp) 1089 struct mthca_qp *qp)
1090{ 1090{
1091 int ret = 0;
1092
1093 if (mthca_is_memfree(dev)) { 1091 if (mthca_is_memfree(dev)) {
1094 qp->rq.db_index = mthca_alloc_db(dev, MTHCA_DB_TYPE_RQ, 1092 qp->rq.db_index = mthca_alloc_db(dev, MTHCA_DB_TYPE_RQ,
1095 qp->qpn, &qp->rq.db); 1093 qp->qpn, &qp->rq.db);
1096 if (qp->rq.db_index < 0) 1094 if (qp->rq.db_index < 0)
1097 return ret; 1095 return -ENOMEM;
1098 1096
1099 qp->sq.db_index = mthca_alloc_db(dev, MTHCA_DB_TYPE_SQ, 1097 qp->sq.db_index = mthca_alloc_db(dev, MTHCA_DB_TYPE_SQ,
1100 qp->qpn, &qp->sq.db); 1098 qp->qpn, &qp->sq.db);
1101 if (qp->sq.db_index < 0) 1099 if (qp->sq.db_index < 0) {
1102 mthca_free_db(dev, MTHCA_DB_TYPE_RQ, qp->rq.db_index); 1100 mthca_free_db(dev, MTHCA_DB_TYPE_RQ, qp->rq.db_index);
1101 return -ENOMEM;
1102 }
1103 } 1103 }
1104 1104
1105 return ret; 1105 return 0;
1106} 1106}
1107 1107
1108static void mthca_free_memfree(struct mthca_dev *dev, 1108static void mthca_free_memfree(struct mthca_dev *dev,