Message ID | CAPgLHd_aDFExSewd3ENBgVU1Ru9LaV2Hwg=wjaO5ygo1qXRQQw@mail.gmail.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
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. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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;