Selaa lähdekoodia

net: emac: remove unnecessary dev_set_drvdata()

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun 9 vuotta sitten
vanhempi
commit
7e5eded5c1
1 muutettua tiedostoa jossa 0 lisäystä ja 1 poistoa
  1. 0 1
      drivers/net/ethernet/qualcomm/emac/emac.c

+ 0 - 1
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;
 }