Skip to contentSkip to conversation

pci: fix pci_find_bus()

PATCH Applied Isaku Yamahata 2 participants 2 messages Feb 8, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pci: fix pci_find_bus()

typo in c021f8e65f5009a5ab5711d9d5326fcab553ef1c.
comparison fix.

Cc Blue Swirl <[email protected]>
Cc "Michael S. Tsirkin" <[email protected]>
---
 hw/pci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
hw/pci.c +1 -1
index 9ad63dd..e91d2e6 100644
@@ -1558,7 +1558,7 @@ PCIBus *pci_find_bus(PCIBus *bus, int bus_num)
     /* try child bus */
     QLIST_FOREACH(sec, &bus->child, sibling) {
         if (!bus->parent_dev /* pci host bridge */
-            || (pci_bus_num(sec) >= bus_num &&
+            || (pci_bus_num(sec) <= bus_num &&
                 bus_num <= bus->parent_dev->config[PCI_SUBORDINATE_BUS]) ) {
             ret = pci_find_bus(sec, bus_num);
             if (ret) {
Signature · 1 line
1.6.6.1
#1 lore raw
Quoted 6 lines · Isaku Yamahata

typo in c021f8e65f5009a5ab5711d9d5326fcab553ef1c.
comparison fix.

Cc Blue Swirl <[email protected]>
Cc "Michael S. Tsirkin" <[email protected]>

thanks, applied.

Quoted 19 lines
---
 hw/pci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
hw/pci.c +1 -1
index 9ad63dd..e91d2e6 100644
@@ -1558,7 +1558,7 @@ PCIBus *pci_find_bus(PCIBus *bus, int bus_num)
     /* try child bus */
     QLIST_FOREACH(sec, &bus->child, sibling) {
         if (!bus->parent_dev /* pci host bridge */
-            || (pci_bus_num(sec) >= bus_num &&
+            || (pci_bus_num(sec) <= bus_num &&
                 bus_num <= bus->parent_dev->config[PCI_SUBORDINATE_BUS]) ) {
             ret = pci_find_bus(sec, bus_num);
             if (ret) {
Signature · 1 line
1.6.6.1