Commit 6e33706b authored by Kenji Kaneshige's avatar Kenji Kaneshige Committed by Greg Kroah-Hartman

[PATCH] pciehp: Add missing pci_dev_put

The PCIEHP driver leaks reference counter of pci_dev structures. This
patch adds missing pci_dev_put() calls to PCIEHP driver.
Signed-off-by: default avatarKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Cc: Kristen Accardi <kristen.c.accardi@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 56bfada3
...@@ -225,6 +225,7 @@ int pciehp_configure_device(struct slot *p_slot) ...@@ -225,6 +225,7 @@ int pciehp_configure_device(struct slot *p_slot)
if ((dev->class >> 16) == PCI_BASE_CLASS_DISPLAY) { if ((dev->class >> 16) == PCI_BASE_CLASS_DISPLAY) {
err("Cannot hot-add display device %s\n", err("Cannot hot-add display device %s\n",
pci_name(dev)); pci_name(dev));
pci_dev_put(dev);
continue; continue;
} }
if ((dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) || if ((dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) ||
...@@ -232,6 +233,7 @@ int pciehp_configure_device(struct slot *p_slot) ...@@ -232,6 +233,7 @@ int pciehp_configure_device(struct slot *p_slot)
pciehp_add_bridge(dev); pciehp_add_bridge(dev);
} }
program_fw_provided_values(dev); program_fw_provided_values(dev);
pci_dev_put(dev);
} }
pci_bus_assign_resources(parent); pci_bus_assign_resources(parent);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment