mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 15:00:53 +07:00
macsonic, jazzsonic: fix oops on module unload
Set the driver data before using it. Fixes an oops when doing rmmod. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
2517747667
commit
4564cba716
@ -229,6 +229,7 @@ static int __init jazz_sonic_probe(struct platform_device *pdev)
|
|||||||
lp = netdev_priv(dev);
|
lp = netdev_priv(dev);
|
||||||
lp->device = &pdev->dev;
|
lp->device = &pdev->dev;
|
||||||
SET_NETDEV_DEV(dev, &pdev->dev);
|
SET_NETDEV_DEV(dev, &pdev->dev);
|
||||||
|
platform_set_drvdata(pdev, dev);
|
||||||
|
|
||||||
netdev_boot_setup_check(dev);
|
netdev_boot_setup_check(dev);
|
||||||
|
|
||||||
|
@ -575,6 +575,7 @@ static int __devinit mac_sonic_probe(struct platform_device *pdev)
|
|||||||
lp = netdev_priv(dev);
|
lp = netdev_priv(dev);
|
||||||
lp->device = &pdev->dev;
|
lp->device = &pdev->dev;
|
||||||
SET_NETDEV_DEV(dev, &pdev->dev);
|
SET_NETDEV_DEV(dev, &pdev->dev);
|
||||||
|
platform_set_drvdata(pdev, dev);
|
||||||
|
|
||||||
/* This will catch fatal stuff like -ENOMEM as well as success */
|
/* This will catch fatal stuff like -ENOMEM as well as success */
|
||||||
err = mac_onboard_sonic_probe(dev);
|
err = mac_onboard_sonic_probe(dev);
|
||||||
|
Loading…
Reference in New Issue
Block a user