/* Returns a pointer to the allocated fcport, or NULL, if none available.  */
static fc_port_t* qla2x00_alloc_fcport(scsi_qla_host_t *vha, gfp_t flags)
/* Returns a pointer to the allocated fcport, or NULL, if none available.  */
static fc_port_t* qla2x00_alloc_fcport(scsi_qla_host_t *vha, gfp_t flags)
{
	fc_port_t *fcport;
	fcport = kzalloc(sizeof(fc_port_t), flags);
	if (!fcport)
		return NULL;
	fcport->vha = vha;
	fcport->vp_idx = vha->vp_idx;
	fcport->port_type = FCT_UNKNOWN;
	fcport->loop_id = FC_NO_LOOP_ID;
	atomic_set(&fcport->state, FCS_UNCONFIGURED);
	fcport->supported_classes = FC_COS_UNSPECIFIED;
	return fcport;
}