summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-11-11 14:17:17 +0800
committerDavid S. Miller <davem@davemloft.net>2013-11-11 14:02:08 -0500
commit8724be0e4aa357ae9388dd6879aa6733900c6f21 (patch)
tree0f897328d895ccb31e41068aa3c4af2b9cd9619f /drivers/net/ethernet
parent06a2feb9e3bd0d2d555ccb19607ff5583cfa03e8 (diff)
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')
-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);