if (qp->rq.db_index < 0) { ret = -ENOMEM; goto err_rdb; } 
if (qp->rq.db_index < 0) return ret; 
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;		ret = mthca_table_get(dev, dev->qp_table.rdb_table,				      qp->qpn << dev->qp_table.rdb_shift);		if (ret)			goto err_eqpc;		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_rdb;		}		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_rdb:	mthca_table_put(dev, dev->qp_table.rdb_table,			qp->qpn << dev->qp_table.rdb_shift);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;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/80c8ec2c04e539aac4e9810a46bc04c1b424b4dd/mthca_qp.c/buggy/drivers/infiniband/hw/mthca/mthca_qp.c