net: hns3: remove unnecessary pci_set_drvdata() and devm_kfree()
authorWei Yongjun <weiyongjun1@huawei.com>
Fri, 30 Mar 2018 02:24:28 +0000 (02:24 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 1 Apr 2018 02:22:25 +0000 (22:22 -0400)
commitc679f6a26dc3d450b76e94717850a14ff706cc58
tree9af17f074957f8563e15ae40a12f33cf6b59b774
parentef817102586cca428d6fe0803cc232a3c929141f
net: hns3: remove unnecessary pci_set_drvdata() and devm_kfree()

There is no need for explicit calls of devm_kfree(), as the allocated
memory will be freed during driver's detach.

The driver core clears the driver data to NULL after device_release.
Thus, it is not needed to manually clear the device driver data to NULL.

So remove the unnecessary pci_set_drvdata() and devm_kfree().

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c