[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Mon, 11 Nov 2013 14:15:12 +0800
From: Wei Yongjun <weiyj.lk@...il.com>
To: grant.likely@...aro.org, rob.herring@...xeda.com,
davem@...emloft.net, abrodkin@...opsys.com, vgupta@...opsys.com
Cc: yongjun_wei@...ndmicro.com.cn, netdev@...r.kernel.org
Subject: [PATCH] ethernet/arc/arc_emac: add missing platform_set_drvdata() in arc_emac_probe()
From: Wei Yongjun <yongjun_wei@...ndmicro.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@...ndmicro.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;
--
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