]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
PCI: vmd: Remove unnecessary pci_set_drvdata()
authorWei Yongjun <weiyongjun1@huawei.com>
Mon, 17 Oct 2016 15:04:44 +0000 (15:04 +0000)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 11 Nov 2016 21:51:35 +0000 (15:51 -0600)
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: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Keith Busch <keith.busch@intel.com>
drivers/pci/host/vmd.c

index 37e29b580be323a10c9cb17985bd2684873e9bcf..6614b3552b9cbb066c517b3a5979b91374db35e6 100644 (file)
@@ -719,7 +719,6 @@ static void vmd_remove(struct pci_dev *dev)
        struct vmd_dev *vmd = pci_get_drvdata(dev);
 
        vmd_detach_resources(vmd);
-       pci_set_drvdata(dev, NULL);
        sysfs_remove_link(&vmd->dev->dev.kobj, "domain");
        pci_stop_root_bus(vmd->bus);
        pci_remove_root_bus(vmd->bus);