From: Libo Chen Date: Wed, 21 Aug 2013 07:02:45 +0000 (+0800) Subject: net: emac: remove unnecessary dev_set_drvdata() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e6b0260c2a154948be825b34e68135c127123d5a;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git net: emac: remove unnecessary dev_set_drvdata() Unnecessary dev_set_drvdata() is removed, because the driver core clears the driver data to NULL after device_release or on probe failure. Signed-off-by: Libo Chen Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/ibm/emac/core.c b/drivers/net/ethernet/ibm/emac/core.c index d300a0c0eafc..2d3b064d6924 100644 --- a/drivers/net/ethernet/ibm/emac/core.c +++ b/drivers/net/ethernet/ibm/emac/core.c @@ -2955,8 +2955,6 @@ static int emac_remove(struct platform_device *ofdev) DBG(dev, "remove" NL); - dev_set_drvdata(&ofdev->dev, NULL); - unregister_netdev(dev->ndev); cancel_work_sync(&dev->reset_work);