aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/arm/ep93xx_eth.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/arm/ep93xx_eth.c b/drivers/net/arm/ep93xx_eth.c
index 8ebd68e2af98..dd698b033a62 100644
--- a/drivers/net/arm/ep93xx_eth.c
+++ b/drivers/net/arm/ep93xx_eth.c
@@ -780,12 +780,10 @@ static struct ethtool_ops ep93xx_ethtool_ops = {
780struct net_device *ep93xx_dev_alloc(struct ep93xx_eth_data *data) 780struct net_device *ep93xx_dev_alloc(struct ep93xx_eth_data *data)
781{ 781{
782 struct net_device *dev; 782 struct net_device *dev;
783 struct ep93xx_priv *ep;
784 783
785 dev = alloc_etherdev(sizeof(struct ep93xx_priv)); 784 dev = alloc_etherdev(sizeof(struct ep93xx_priv));
786 if (dev == NULL) 785 if (dev == NULL)
787 return NULL; 786 return NULL;
788 ep = netdev_priv(dev);
789 787
790 memcpy(dev->dev_addr, data->dev_addr, ETH_ALEN); 788 memcpy(dev->dev_addr, data->dev_addr, ETH_ALEN);
791 789
@@ -840,9 +838,9 @@ static int ep93xx_eth_probe(struct platform_device *pdev)
840 struct ep93xx_priv *ep; 838 struct ep93xx_priv *ep;
841 int err; 839 int err;
842 840
843 data = pdev->dev.platform_data;
844 if (pdev == NULL) 841 if (pdev == NULL)
845 return -ENODEV; 842 return -ENODEV;
843 data = pdev->dev.platform_data;
846 844
847 dev = ep93xx_dev_alloc(data); 845 dev = ep93xx_dev_alloc(data);
848 if (dev == NULL) { 846 if (dev == NULL) {