From: Libo Chen Date: Wed, 21 Aug 2013 07:02:41 +0000 (+0800) Subject: net: davinci_mdio: remove unnecessary dev_set_drvdata() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=110a183c8a1c61b9de7b5c19421beb6e585181d4;p=openwrt%2Fstaging%2Fblogic.git net: davinci_mdio: 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/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c index 01b0cc5a4acf..7f8514384863 100644 --- a/drivers/net/ethernet/ti/davinci_mdio.c +++ b/drivers/net/ethernet/ti/davinci_mdio.c @@ -433,8 +433,6 @@ static int davinci_mdio_remove(struct platform_device *pdev) pm_runtime_put_sync(&pdev->dev); pm_runtime_disable(&pdev->dev); - dev_set_drvdata(dev, NULL); - kfree(data); return 0;