[PATCH net-next 3/5] net: ag71xx: remove platform_set_drvdata

Rosen Penev posted 5 patches 1 month, 4 weeks ago
[PATCH net-next 3/5] net: ag71xx: remove platform_set_drvdata
Posted by Rosen Penev 1 month, 4 weeks ago
platform_get_drvdata is never called as a result of all the devm
conversions.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 drivers/net/ethernet/atheros/ag71xx.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/ethernet/atheros/ag71xx.c b/drivers/net/ethernet/atheros/ag71xx.c
index 195354b0a187..ec360a3e9f0e 100644
--- a/drivers/net/ethernet/atheros/ag71xx.c
+++ b/drivers/net/ethernet/atheros/ag71xx.c
@@ -1915,8 +1915,6 @@ static int ag71xx_probe(struct platform_device *pdev)
 	if (err)
 		return err;
 
-	platform_set_drvdata(pdev, ndev);
-
 	err = ag71xx_phylink_setup(ag);
 	if (err)
 		return dev_err_probe(&pdev->dev, err,
@@ -1925,7 +1923,6 @@ static int ag71xx_probe(struct platform_device *pdev)
 	err = devm_register_netdev(&pdev->dev, ndev);
 	if (err) {
 		netif_err(ag, probe, ndev, "unable to register net device\n");
-		platform_set_drvdata(pdev, NULL);
 		return err;
 	}
 
-- 
2.46.2