summaryrefslogtreecommitdiff
path: root/drivers/pci/search.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2013-01-26 17:35:58 -0700
committerBjorn Helgaas <bhelgaas@google.com>2013-01-26 17:35:58 -0700
commit939de1d69c5fb0da0cfe05a1a7c981421cf876f7 (patch)
tree3ca1c6457e1c1ae4c11adab60e94d666841983aa /drivers/pci/search.c
parentfb455792d91469fe556b68f1baa9ff5493432be8 (diff)
parent4f535093cf8f6da8cfda7c36c2c1ecd2e9586ee4 (diff)
Merge branch 'pci/yinghai-root-bus-hotplug' into next
* pci/yinghai-root-bus-hotplug: PCI: Put pci_dev in device tree as early as possible PCI: Skip attaching driver in device_add() PCI: acpiphp: Keep driver loaded even if no slots found PCI/ACPI: Print info if host bridge notify handler installation fails PCI: acpiphp: Move host bridge hotplug to pci_root.c PCI/ACPI: acpiphp: Rename alloc_acpiphp_hp_work() to alloc_acpi_hp_work() PCI: Make device create/destroy logic symmetric PCI: Fix reference count leak in pci_dev_present() PCI: Set pci_dev dev_node early so IOAPIC irq_descs are allocated locally PCI: Add root bus children dev's res to fail list PCI: acpiphp: Add is_hotplug_bridge detection Conflicts: drivers/pci/pci.h
Diffstat (limited to 'drivers/pci/search.c')
-rw-r--r--drivers/pci/search.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/pci/search.c b/drivers/pci/search.c
index bf969ba58e59..d0627fa9f368 100644
--- a/drivers/pci/search.c
+++ b/drivers/pci/search.c
@@ -319,13 +319,13 @@ int pci_dev_present(const struct pci_device_id *ids)
WARN_ON(in_interrupt());
while (ids->vendor || ids->subvendor || ids->class_mask) {
found = pci_get_dev_by_id(ids, NULL);
- if (found)
- goto exit;
+ if (found) {
+ pci_dev_put(found);
+ return 1;
+ }
ids++;
}
-exit:
- if (found)
- return 1;
+
return 0;
}
EXPORT_SYMBOL(pci_dev_present);