Skip to content

Commit

Permalink
PCI: vmd: Remove unnecessary pci_set_drvdata()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and Bjorn Helgaas committed Nov 11, 2016
1 parent 1001354 commit 5b23e8f
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/pci/host/vmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5b23e8f

Please sign in to comment.