Patchwork [10/11] isa: always use provided ISA bus in isa_bus_irqs()

login
register
mail settings
Submitter Hervé Poussineau
Date Dec. 14, 2011, 11:02 p.m.
Message ID <1323903763-22933-11-git-send-email-hpoussin@reactos.org>
Download mbox | patch
Permalink /patch/131497/
State New
Headers show

Comments

Hervé Poussineau - Dec. 14, 2011, 11:02 p.m.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
---
 hw/isa-bus.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

Patch

diff --git a/hw/isa-bus.c b/hw/isa-bus.c
index 3207680..5af790b 100644
--- a/hw/isa-bus.c
+++ b/hw/isa-bus.c
@@ -53,8 +53,10 @@  ISABus *isa_bus_new(DeviceState *dev, MemoryRegion *address_space_io)
 
 void isa_bus_irqs(ISABus *bus, qemu_irq *irqs)
 {
-    assert(!bus || bus == isabus);
-    isabus->irqs = irqs;
+    if (!bus) {
+        hw_error("Can't set isa irqs with no isa bus present.");
+    }
+    bus->irqs = irqs;
 }
 
 /*