/* Returns: pointer to a struct fcoe_interface or NULL on error  */
static struct fcoe_interface* fcoe_interface_create(struct net_device *netdev)
/* Returns: pointer to a struct fcoe_interface or NULL on error  */
static struct fcoe_interface* fcoe_interface_create(struct net_device *netdev)
{
	struct fcoe_interface *fcoe;
	int err;
	fcoe = kzalloc(sizeof(*fcoe), GFP_KERNEL);
	if (!fcoe) {
		FCOE_NETDEV_DBG(netdev, "Could not allocate fcoe structure\n");
		return NULL;
	}
	dev_hold(netdev);
	kref_init(&fcoe->kref);
	fcoe_ctlr_init(&fcoe->ctlr);
	fcoe->ctlr.send = fcoe_fip_send;
	fcoe->ctlr.update_mac = fcoe_update_src_mac;
	fcoe->ctlr.get_src_addr = fcoe_get_src_mac;
	err = fcoe_interface_setup(fcoe, netdev);
	if (err) {
		fcoe_ctlr_destroy(&fcoe->ctlr);
		kfree(fcoe);
		dev_put(netdev);
		return NULL;
	}
	return fcoe;
}