Skip to content

Commit

Permalink
net: emac: remove unnecessary dev_set_drvdata()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and David S. Miller committed Sep 16, 2016
1 parent 46c21e2 commit 7e5eded
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/net/ethernet/qualcomm/emac/emac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 7e5eded

Please sign in to comment.