提交 c9598408 编写于 作者: J Jingoo Han 提交者: David S. Miller

net: ksz884x: remove unnecessary pci_set_drvdata()

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: NJingoo Han <jg1.han@samsung.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 21d35d21
...@@ -7150,8 +7150,6 @@ static void pcidev_exit(struct pci_dev *pdev) ...@@ -7150,8 +7150,6 @@ static void pcidev_exit(struct pci_dev *pdev)
struct platform_info *info = pci_get_drvdata(pdev); struct platform_info *info = pci_get_drvdata(pdev);
struct dev_info *hw_priv = &info->dev_info; struct dev_info *hw_priv = &info->dev_info;
pci_set_drvdata(pdev, NULL);
release_mem_region(pci_resource_start(pdev, 0), release_mem_region(pci_resource_start(pdev, 0),
pci_resource_len(pdev, 0)); pci_resource_len(pdev, 0));
for (i = 0; i < hw_priv->hw.dev_count; i++) { for (i = 0; i < hw_priv->hw.dev_count; i++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册