dev->change_mtu = bcm_enet_change_mtu;
SET_ETHTOOL_OPS(dev, &bcm_enet_ethtool_ops);
+ SET_NETDEV_DEV(dev, &pdev->dev);
ret = register_netdev(dev);
if (ret)
platform_set_drvdata(pdev, dev);
priv->pdev = pdev;
priv->net_dev = dev;
- SET_NETDEV_DEV(dev, &pdev->dev);
return 0;
clk_disable(priv->mac_clk);
clk_put(priv->mac_clk);
+ platform_set_drvdata(pdev, NULL);
free_netdev(dev);
return 0;
}