diff --git a/drivers/net/ethernet/hisilicon/hip04_eth.c b/drivers/net/ethernet/hisilicon/hip04_eth.c index 854befde0a08c9031df92a69c5c9e3709062c188..97b184774784beb603c27d62486e771f3a8af80b 100644 --- a/drivers/net/ethernet/hisilicon/hip04_eth.c +++ b/drivers/net/ethernet/hisilicon/hip04_eth.c @@ -828,6 +828,7 @@ static int hip04_mac_probe(struct platform_device *pdev) priv = netdev_priv(ndev); priv->ndev = ndev; platform_set_drvdata(pdev, ndev); + SET_NETDEV_DEV(ndev, &pdev->dev); res = platform_get_resource(pdev, IORESOURCE_MEM, 0); priv->base = devm_ioremap_resource(d, res); @@ -903,7 +904,6 @@ static int hip04_mac_probe(struct platform_device *pdev) ndev->priv_flags |= IFF_UNICAST_FLT; ndev->irq = irq; netif_napi_add(ndev, &priv->napi, hip04_rx_poll, NAPI_POLL_WEIGHT); - SET_NETDEV_DEV(ndev, &pdev->dev); hip04_reset_ppe(priv); if (priv->phy_mode == PHY_INTERFACE_MODE_MII)