Commit:     3c92c57af9a24a08b8d2f76650b1209239914fcd
Parent:     e3008dedff4bdc96a5f67224cd3d8d12237082a0
Author:     Ben Gardner <[EMAIL PROTECTED]>
AuthorDate: Thu May 10 22:58:58 2007 -0700
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Thu May 31 16:56:37 2007 -0700

    PCI: Fix pci_find_present
    pci_find_present() is only matching the last item in the list of ids.
    The break after the match is found only escapes the for loop, not the
    while loop, so found gets reset to NULL on the next pass.
    Signed-off-by: Ben Gardner <[EMAIL PROTECTED]>
    Cc: Alan Cox <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
 drivers/pci/search.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/pci/search.c b/drivers/pci/search.c
index b137a27..c132324 100644
--- a/drivers/pci/search.c
+++ b/drivers/pci/search.c
@@ -403,10 +403,11 @@ const struct pci_device_id *pci_find_present(const struct 
pci_device_id *ids)
        while (ids->vendor || ids->subvendor || ids->class_mask) {
                list_for_each_entry(dev, &pci_devices, global_list) {
                        if ((found = pci_match_one_device(ids, dev)) != NULL)
-                               break;
+                               goto exit;
        return found;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to