/* Return codes 0 - successful -ENOMEM - No availble memory  */
static int lpfc_sli4_cq_event_pool_create(struct lpfc_hba *)
/* Return codes 0 - successful -ENOMEM - No availble memory  */
static int lpfc_sli4_cq_event_pool_create(struct lpfc_hba *)
{
	struct lpfc_cq_event *cq_event;
	int i;
	for (i = 0; i < (4 * phba->sli4_hba.cq_ecount); i++) {
		cq_event = kmalloc(sizeof(struct lpfc_cq_event), GFP_KERNEL);
		if (!cq_event)
			goto out_pool_create_fail;
		list_add_tail(&cq_event->list,
			      &phba->sli4_hba.sp_cqe_event_pool);
	}
	return 0;
out_pool_create_fail:
	lpfc_sli4_cq_event_pool_destroy(phba);
	return -ENOMEM;
}