[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Mon, 11 Nov 2013 14:17:17 +0800
From: Wei Yongjun <weiyj.lk@...il.com>
To: davem@...emloft.net, wfp5p@...ginia.edu,
gregkh@...uxfoundation.org, michael.opdenacker@...e-electrons.com,
joe@...ches.com
Cc: yongjun_wei@...ndmicro.com.cn, netdev@...r.kernel.org
Subject: [PATCH] xtsonic: add missing platform_set_drvdata() in xtsonic_probe()
From: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
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@...ndmicro.com.cn>
---
drivers/net/ethernet/natsemi/xtsonic.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/natsemi/xtsonic.c b/drivers/net/ethernet/natsemi/xtsonic.c
index 4da172a..7007d21 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);
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists