[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Mon, 11 Nov 2013 14:16:16 +0800
From: Wei Yongjun <weiyj.lk@...il.com>
To: davem@...emloft.net, wfp5p@...ginia.edu,
gregkh@...uxfoundation.org, joe@...ches.com
Cc: yongjun_wei@...ndmicro.com.cn, netdev@...r.kernel.org
Subject: [PATCH] macmace: add missing platform_set_drvdata() in mace_probe()
From: Wei Yongjun <yongjun_wei@...ndmicro.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@...ndmicro.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;
--
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