summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/natsemi
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-11-11 07:17:17 +0100
committerDavid S. Miller <davem@davemloft.net>2013-11-11 20:02:08 +0100
commit8724be0e4aa357ae9388dd6879aa6733900c6f21 (patch)
tree0f897328d895ccb31e41068aa3c4af2b9cd9619f /drivers/net/ethernet/natsemi
parentmacmace: add missing platform_set_drvdata() in mace_probe() (diff)
downloadlinux-8724be0e4aa357ae9388dd6879aa6733900c6f21.tar.xz
linux-8724be0e4aa357ae9388dd6879aa6733900c6f21.zip
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>
Diffstat (limited to 'drivers/net/ethernet/natsemi')
-rw-r--r--drivers/net/ethernet/natsemi/xtsonic.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/natsemi/xtsonic.c b/drivers/net/ethernet/natsemi/xtsonic.c
index 4da172ac5599..7007d212f3e4 100644
--- a/drivers/net/ethernet/natsemi/xtsonic.c
+++ b/drivers/net/ethernet/natsemi/xtsonic.c
@@ -264,6 +264,7 @@ int xtsonic_probe(struct platform_device *pdev)
lp = netdev_priv(dev);
lp->device = &pdev->dev;
+ platform_set_drvdata(pdev, dev);
SET_NETDEV_DEV(dev, &pdev->dev);
netdev_boot_setup_check(dev);