diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/pcie/portdrv_core.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c index 9811eea5351..6a6e5490933 100644 --- a/drivers/pci/pcie/portdrv_core.c +++ b/drivers/pci/pcie/portdrv_core.c @@ -349,7 +349,6 @@ static int pcie_device_init(struct pci_dev *pdev, int service, int irq) return retval; } - get_device(device); return 0; } @@ -456,10 +455,8 @@ int pcie_port_device_resume(struct device *dev) static int remove_iter(struct device *dev, void *data) { - if (dev->bus == &pcie_port_bus_type) { - put_device(dev); + if (dev->bus == &pcie_port_bus_type) device_unregister(dev); - } return 0; } |