net: emac: remove unnecessary dev_set_drvdata()
Subsystems (3)
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.
Signed-off-by Wei Yongjun <[email protected]>
--- drivers/net/ethernet/qualcomm/emac/emac.c | 1 - 1 file changed, 1 deletion(-)
drivers/net/ethernet/qualcomm/emac/emac.c +0 -1
@@ -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 ; }
From: Wei Yongjun <[email protected]>
Date: Thu, 15 Sep 2016 02:25:52 +0000
Quoted 7 lines
From: Wei Yongjun <[email protected]>
The driver core clears the driver data to NULL after
device_releaseor on probe failure. Thus, it is not needed to manually clear the device driver data to NULL.Signed-off-by Wei Yongjun <[email protected]>
Applied.