if (uvt->info_len && info) {  
if (uvt->info_len) { 
static int ib_ucm_event_process(struct ib_cm_event *evt,				struct ib_ucm_event *uvt){	void *info = NULL;	int result;	switch (evt->event) {	case IB_CM_REQ_RECEIVED:		ib_ucm_event_req_get(&uvt->resp.u.req_resp,				     &evt->param.req_rcvd);		uvt->data_len      = IB_CM_REQ_PRIVATE_DATA_SIZE;		uvt->resp.present |= (evt->param.req_rcvd.primary_path ?				      IB_UCM_PRES_PRIMARY : 0);		uvt->resp.present |= (evt->param.req_rcvd.alternate_path ?				      IB_UCM_PRES_ALTERNATE : 0);		break;	case IB_CM_REP_RECEIVED:		ib_ucm_event_rep_get(&uvt->resp.u.rep_resp,				     &evt->param.rep_rcvd);		uvt->data_len = IB_CM_REP_PRIVATE_DATA_SIZE;		break;	case IB_CM_RTU_RECEIVED:		uvt->data_len = IB_CM_RTU_PRIVATE_DATA_SIZE;		uvt->resp.u.send_status = evt->param.send_status;		break;	case IB_CM_DREQ_RECEIVED:		uvt->data_len = IB_CM_DREQ_PRIVATE_DATA_SIZE;		uvt->resp.u.send_status = evt->param.send_status;		break;	case IB_CM_DREP_RECEIVED:		uvt->data_len = IB_CM_DREP_PRIVATE_DATA_SIZE;		uvt->resp.u.send_status = evt->param.send_status;		break;	case IB_CM_MRA_RECEIVED:		ib_ucm_event_mra_get(&uvt->resp.u.mra_resp,				     &evt->param.mra_rcvd);		uvt->data_len = IB_CM_MRA_PRIVATE_DATA_SIZE;		break;	case IB_CM_REJ_RECEIVED:		ib_ucm_event_rej_get(&uvt->resp.u.rej_resp,				     &evt->param.rej_rcvd);		uvt->data_len = IB_CM_REJ_PRIVATE_DATA_SIZE;		uvt->info_len = evt->param.rej_rcvd.ari_length;		info	      = evt->param.rej_rcvd.ari;		break;	case IB_CM_LAP_RECEIVED:		ib_ucm_event_lap_get(&uvt->resp.u.lap_resp,				     &evt->param.lap_rcvd);		uvt->data_len = IB_CM_LAP_PRIVATE_DATA_SIZE;		uvt->resp.present |= (evt->param.lap_rcvd.alternate_path ?				      IB_UCM_PRES_ALTERNATE : 0);		break;	case IB_CM_APR_RECEIVED:		ib_ucm_event_apr_get(&uvt->resp.u.apr_resp,				     &evt->param.apr_rcvd);		uvt->data_len = IB_CM_APR_PRIVATE_DATA_SIZE;		uvt->info_len = evt->param.apr_rcvd.info_len;		info	      = evt->param.apr_rcvd.apr_info;		break;	case IB_CM_SIDR_REQ_RECEIVED:		ib_ucm_event_sidr_req_get(&uvt->resp.u.sidr_req_resp,					  &evt->param.sidr_req_rcvd);		uvt->data_len = IB_CM_SIDR_REQ_PRIVATE_DATA_SIZE;		break;	case IB_CM_SIDR_REP_RECEIVED:		ib_ucm_event_sidr_rep_get(&uvt->resp.u.sidr_rep_resp,					  &evt->param.sidr_rep_rcvd);		uvt->data_len = IB_CM_SIDR_REP_PRIVATE_DATA_SIZE;		uvt->info_len = evt->param.sidr_rep_rcvd.info_len;		info	      = evt->param.sidr_rep_rcvd.info;		break;	default:		uvt->resp.u.send_status = evt->param.send_status;		break;	}	if (uvt->data_len && evt->private_data) {		uvt->data = kmalloc(uvt->data_len, GFP_KERNEL);		if (!uvt->data) {			result = -ENOMEM;			goto error;		}		memcpy(uvt->data, evt->private_data, uvt->data_len);		uvt->resp.present |= IB_UCM_PRES_DATA;	}	if (uvt->info_len && info) {		uvt->info = kmalloc(uvt->info_len, GFP_KERNEL);		if (!uvt->info) {			result = -ENOMEM;			goto error;		}		memcpy(uvt->info, info, uvt->info_len);		uvt->resp.present |= IB_UCM_PRES_INFO;	}	return 0;error:	kfree(uvt->info);	kfree(uvt->data);	return result;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/b9ef520f9caf20aba8ac7cb2bbba45b52ff19d53/ucm.c/clean/drivers/infiniband/core/ucm.c