/* zfcp_fc_ns_gid_pn_request - initiate GID_PN nameserver request @port: port where GID_PN request is needed return: -ENOMEM on error, 0 otherwise  */
static int zfcp_fc_ns_gid_pn(struct zfcp_port *port)
/* zfcp_fc_ns_gid_pn_request - initiate GID_PN nameserver request @port: port where GID_PN request is needed return: -ENOMEM on error, 0 otherwise  */
static int zfcp_fc_ns_gid_pn(struct zfcp_port *port)
{
	int ret;
	struct zfcp_fc_gid_pn *gid_pn;
	struct zfcp_adapter *adapter = port->adapter;
	gid_pn = mempool_alloc(adapter->pool.gid_pn, GFP_ATOMIC);
	if (!gid_pn)
		return -ENOMEM;
	memset(gid_pn, 0, sizeof(*gid_pn));
	ret = zfcp_fc_wka_port_get(&adapter->gs->ds);
	if (ret)
		goto out;
	ret = zfcp_fc_ns_gid_pn_request(port, gid_pn);
	zfcp_fc_wka_port_put(&adapter->gs->ds);
out:
	mempool_free(gid_pn, adapter->pool.gid_pn);
	return ret;
}