netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] macmace: add missing platform_set_drvdata() in mace_probe()
@ 2013-11-11  6:16 Wei Yongjun
  2013-11-11 19:02 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2013-11-11  6:16 UTC (permalink / raw)
  To: davem, wfp5p, gregkh, joe; +Cc: yongjun_wei, netdev

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Add missing platform_set_drvdata() in mace_probe(), otherwise
calling platform_get_drvdata() in mac_mace_device_remove() may
returns NULL.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/net/ethernet/apple/macmace.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/apple/macmace.c b/drivers/net/ethernet/apple/macmace.c
index 4ce8ceb..58a200d 100644
--- a/drivers/net/ethernet/apple/macmace.c
+++ b/drivers/net/ethernet/apple/macmace.c
@@ -211,6 +211,7 @@ static int mace_probe(struct platform_device *pdev)
 	mp = netdev_priv(dev);
 
 	mp->device = &pdev->dev;
+	platform_set_drvdata(pdev, dev);
 	SET_NETDEV_DEV(dev, &pdev->dev);
 
 	dev->base_addr = (u32)MACE_BASE;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] macmace: add missing platform_set_drvdata() in mace_probe()
  2013-11-11  6:16 [PATCH] macmace: add missing platform_set_drvdata() in mace_probe() Wei Yongjun
@ 2013-11-11 19:02 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-11-11 19:02 UTC (permalink / raw)
  To: weiyj.lk; +Cc: wfp5p, gregkh, joe, yongjun_wei, netdev

From: Wei Yongjun <weiyj.lk@gmail.com>
Date: Mon, 11 Nov 2013 14:16:16 +0800

> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Add missing platform_set_drvdata() in mace_probe(), otherwise
> calling platform_get_drvdata() in mac_mace_device_remove() may
> returns NULL.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-11-11 19:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-11  6:16 [PATCH] macmace: add missing platform_set_drvdata() in mace_probe() Wei Yongjun
2013-11-11 19:02 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).