Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4564cba7 authored by Finn Thain's avatar Finn Thain Committed by David S. Miller
Browse files

macsonic, jazzsonic: fix oops on module unload



Set the driver data before using it. Fixes an oops when doing rmmod.

Signed-off-by: default avatarFinn Thain <fthain@telegraphics.com.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 25177476
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -229,6 +229,7 @@ static int __init jazz_sonic_probe(struct platform_device *pdev)
	lp = netdev_priv(dev);
	lp->device = &pdev->dev;
	SET_NETDEV_DEV(dev, &pdev->dev);
	platform_set_drvdata(pdev, dev);

	netdev_boot_setup_check(dev);

+1 −0
Original line number Diff line number Diff line
@@ -575,6 +575,7 @@ static int __devinit mac_sonic_probe(struct platform_device *pdev)
	lp = netdev_priv(dev);
	lp->device = &pdev->dev;
	SET_NETDEV_DEV(dev, &pdev->dev);
	platform_set_drvdata(pdev, dev);

	/* This will catch fatal stuff like -ENOMEM as well as success */
	err = mac_onboard_sonic_probe(dev);