aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ethernet/freescale/fec_main.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index fc2cccd887ea..e69760eb4095 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -2033,10 +2033,6 @@ fec_probe(struct platform_device *pdev)
2033 if (of_id) 2033 if (of_id)
2034 pdev->id_entry = of_id->data; 2034 pdev->id_entry = of_id->data;
2035 2035
2036 r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
2037 if (!r)
2038 return -ENXIO;
2039
2040 /* Init network device */ 2036 /* Init network device */
2041 ndev = alloc_etherdev(sizeof(struct fec_enet_private)); 2037 ndev = alloc_etherdev(sizeof(struct fec_enet_private));
2042 if (!ndev) 2038 if (!ndev)
@@ -2054,6 +2050,7 @@ fec_probe(struct platform_device *pdev)
2054 fep->pause_flag |= FEC_PAUSE_FLAG_AUTONEG; 2050 fep->pause_flag |= FEC_PAUSE_FLAG_AUTONEG;
2055#endif 2051#endif
2056 2052
2053 r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
2057 fep->hwp = devm_ioremap_resource(&pdev->dev, r); 2054 fep->hwp = devm_ioremap_resource(&pdev->dev, r);
2058 if (IS_ERR(fep->hwp)) { 2055 if (IS_ERR(fep->hwp)) {
2059 ret = PTR_ERR(fep->hwp); 2056 ret = PTR_ERR(fep->hwp);