Message ID | 1346622861-30865-2-git-send-email-yinghai@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/pci/search.c b/drivers/pci/search.c index d84cdcf..cd11bd8 100644 --- a/drivers/pci/search.c +++ b/drivers/pci/search.c @@ -338,13 +338,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);