net: ethernet: xscale: remove unnecessary platform_set_drvdata()
Subsystems (3)
PATCH 31/36 net: ethernet: xscale: remove unnecessary platform_set_drvdata()
The driver core clears the driver data to NULL after device_release or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d (device-core: Ensure drvdata = NULL when no driver is bound). Thus, it is not needed to manually clear the device driver data to NULL.
Signed-off-by Jingoo Han <[email protected]>
--- drivers/net/ethernet/xscale/ixp4xx_eth.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/net/ethernet/xscale/ixp4xx_eth.c +0 -2
@@ -1472,7 +1472,6 @@ err_phy_dis:phy_disconnect (port->phydev); err_free_mem: npe_port_tab[NPE_ID (port->id)] =NULL ; -platform_set_drvdata (pdev,NULL );release_resource (port->mem_res); err_npe_rel:npe_release (port->npe);
@@ -1489,7 +1488,6 @@ static int eth_remove_one(struct platform_device *pdev)unregister_netdev (dev);phy_disconnect (port->phydev); npe_port_tab[NPE_ID (port->id)] =NULL ; -platform_set_drvdata (pdev,NULL );npe_release (port->npe);release_resource (port->mem_res);free_netdev (dev);
Signature · 1 line
1.7.2.5