goto err_eqpc;
goto err_rdb;
static int mthca_alloc_memfree(struct mthca_dev *dev,			       struct mthca_qp *qp){	int ret = 0;	if (mthca_is_memfree(dev)) {		ret = mthca_table_get(dev, dev->qp_table.qp_table, qp->qpn);		if (ret)			return ret;		ret = mthca_table_get(dev, dev->qp_table.eqp_table, qp->qpn);		if (ret)			goto err_qpc;		qp->rq.db_index = mthca_alloc_db(dev, MTHCA_DB_TYPE_RQ,						 qp->qpn, &qp->rq.db);		if (qp->rq.db_index < 0) {			ret = -ENOMEM;			goto err_eqpc;		}		qp->sq.db_index = mthca_alloc_db(dev, MTHCA_DB_TYPE_SQ,						 qp->qpn, &qp->sq.db);		if (qp->sq.db_index < 0) {			ret = -ENOMEM;			goto err_rq_db;		}	}	return 0;err_rq_db:	mthca_free_db(dev, MTHCA_DB_TYPE_RQ, qp->rq.db_index);err_eqpc:	mthca_table_put(dev, dev->qp_table.eqp_table, qp->qpn);err_qpc:	mthca_table_put(dev, dev->qp_table.qp_table, qp->qpn);	return ret;}