From: Jisheng Zhang Date: Wed, 12 Nov 2014 11:08:47 +0000 (+0800) Subject: net: pxa168_eth: move SET_NETDEV_DEV a bit earlier X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=824ab78215c51429a2b0e17356a00a59e4e91a9a;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git net: pxa168_eth: move SET_NETDEV_DEV a bit earlier This is to ensure the net_device's dev.parent is set before we used it in dma_zalloc_coherent() from init_hash_table(). Signed-off-by: Jisheng Zhang Acked-by: Antoine Tenart Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/marvell/pxa168_eth.c b/drivers/net/ethernet/marvell/pxa168_eth.c index 21ddecef151e..38f7ceee77d2 100644 --- a/drivers/net/ethernet/marvell/pxa168_eth.c +++ b/drivers/net/ethernet/marvell/pxa168_eth.c @@ -1540,8 +1540,8 @@ static int pxa168_eth_probe(struct platform_device *pdev) if (err) goto err_free_mdio; - pxa168_init_hw(pep); SET_NETDEV_DEV(dev, &pdev->dev); + pxa168_init_hw(pep); err = register_netdev(dev); if (err) goto err_mdiobus;