Skip to contentSkip to conversation

net: emac: remove unnecessary dev_set_drvdata()

PATCH Applied Wei Yongjun 2 participants 2 messages Sep 15, 2016 – Sep 16, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: emac: remove unnecessary dev_set_drvdata()

From: Wei Yongjun <[email protected]>

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.

---
 drivers/net/ethernet/qualcomm/emac/emac.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/ethernet/qualcomm/emac/emac.c +0 -1
index 56e0a9f..42d2d233 100644
@@ -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;
 }