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:

committed by
David S. Miller

parent
2517747667
commit
4564cba716
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user