All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ethernet/arc/arc_emac: add missing platform_set_drvdata() in arc_emac_probe()
@ 2013-11-11  6:15 Wei Yongjun
  2013-11-11 19:02 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2013-11-11  6:15 UTC (permalink / raw)
  To: grant.likely, rob.herring, davem, abrodkin, vgupta; +Cc: yongjun_wei, netdev

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

Add missing platform_set_drvdata() in arc_emac_probe(), otherwise
calling platform_get_drvdata() in arc_emac_remove() may returns NULL.

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

diff --git a/drivers/net/ethernet/arc/emac_main.c b/drivers/net/ethernet/arc/emac_main.c
index 9e16014..cbaa7f9 100644
--- a/drivers/net/ethernet/arc/emac_main.c
+++ b/drivers/net/ethernet/arc/emac_main.c
@@ -671,6 +671,7 @@ static int arc_emac_probe(struct platform_device *pdev)
 	if (!ndev)
 		return -ENOMEM;
 
+	platform_set_drvdata(pdev, ndev);
 	SET_NETDEV_DEV(ndev, &pdev->dev);
 
 	ndev->netdev_ops = &arc_emac_netdev_ops;

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

* Re: [PATCH] ethernet/arc/arc_emac: add missing platform_set_drvdata() in arc_emac_probe()
  2013-11-11  6:15 [PATCH] ethernet/arc/arc_emac: add missing platform_set_drvdata() in arc_emac_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: grant.likely, rob.herring, abrodkin, vgupta, yongjun_wei, netdev

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

> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Add missing platform_set_drvdata() in arc_emac_probe(), otherwise
> calling platform_get_drvdata() in arc_emac_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:15 [PATCH] ethernet/arc/arc_emac: add missing platform_set_drvdata() in arc_emac_probe() Wei Yongjun
2013-11-11 19:02 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.