All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] net: emac: remove unnecessary dev_set_drvdata()
@ 2016-09-15  2:25 Wei Yongjun
  2016-09-16  8:26 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2016-09-15  2:25 UTC (permalink / raw)
  To: Timur Tabi; +Cc: Wei Yongjun, netdev

From: Wei Yongjun <weiyongjun1@huawei.com>

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/net/ethernet/qualcomm/emac/emac.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/qualcomm/emac/emac.c b/drivers/net/ethernet/qualcomm/emac/emac.c
index 56e0a9f..42d2d233 100644
--- a/drivers/net/ethernet/qualcomm/emac/emac.c
+++ b/drivers/net/ethernet/qualcomm/emac/emac.c
@@ -722,7 +722,6 @@ static int emac_remove(struct platform_device *pdev)
 
 	mdiobus_unregister(adpt->mii_bus);
 	free_netdev(netdev);
-	dev_set_drvdata(&pdev->dev, NULL);
 
 	return 0;
 }

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

* Re: [PATCH -next] net: emac: remove unnecessary dev_set_drvdata()
  2016-09-15  2:25 [PATCH -next] net: emac: remove unnecessary dev_set_drvdata() Wei Yongjun
@ 2016-09-16  8:26 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-09-16  8:26 UTC (permalink / raw)
  To: weiyj.lk; +Cc: timur, weiyongjun1, netdev

From: Wei Yongjun <weiyj.lk@gmail.com>
Date: Thu, 15 Sep 2016 02:25:52 +0000

> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> The driver core clears the driver data to NULL after device_release
> or on probe failure. Thus, it is not needed to manually clear the
> device driver data to NULL.
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Applied.

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

end of thread, other threads:[~2016-09-16  8:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-15  2:25 [PATCH -next] net: emac: remove unnecessary dev_set_drvdata() Wei Yongjun
2016-09-16  8:26 ` 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.