Message ID | 1387815007-1272-15-git-send-email-mst@redhat.com |
---|---|
State | New |
Headers | show |
diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 83ea0a0..131e599 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -217,15 +217,16 @@ static int pcibus_reset(BusState *qbus) PCIBus *bus = DO_UPCAST(PCIBus, qbus, qbus); int i; - for (i = 0; i < bus->nirq; i++) { - bus->irq_count[i] = 0; - } for (i = 0; i < ARRAY_SIZE(bus->devices); ++i) { if (bus->devices[i]) { pci_device_reset(bus->devices[i]); } } + for (i = 0; i < bus->nirq; i++) { + assert(bus->irq_count[i] == 0); + } + /* topology traverse is done by pci_bus_reset(). Tell qbus/qdev walker not to traverse the tree */ return 1;