Skip to content

Commit 8724be0

Browse files
Wei Yongjundavem330
authored andcommitted
xtsonic: add missing platform_set_drvdata() in xtsonic_probe()
Add missing platform_set_drvdata() in xtsonic_probe(), otherwise calling platform_get_drvdata() in xtsonic_device_remove() may returns NULL. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 06a2feb commit 8724be0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/ethernet/natsemi/xtsonic.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ int xtsonic_probe(struct platform_device *pdev)
264264

265265
lp = netdev_priv(dev);
266266
lp->device = &pdev->dev;
267+
platform_set_drvdata(pdev, dev);
267268
SET_NETDEV_DEV(dev, &pdev->dev);
268269
netdev_boot_setup_check(dev);
269270

0 commit comments

Comments
 (0)