From 675463d9b6b2c2b65a713a6d906aeebe9e6750ae Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 17 Dec 2015 13:19:53 +0100 Subject: [PATCH] isa: Clean up inappropriate hw_error() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit isa_bus_irqs(), isa_create() and isa_try_create() call hw_error() when passed a null bus. Use of hw_error() has always been questionable, because these are used only during machine initialization, and printing CPU registers isn't useful there. Since the previous commit, passing a null bus is a programming error. Drop the hw_error() and simply let it crash. Cc: Richard Henderson Cc: "Michael S. Tsirkin" Cc: "Hervé Poussineau" Cc: Aurelien Jarno Cc: Mark Cave-Ayland Signed-off-by: Markus Armbruster Reviewed-by: Hervé Poussineau Message-Id: <1450354795-31608-12-git-send-email-armbru@redhat.com> Reviewed-by: Richard Henderson --- hw/isa/isa-bus.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index af6ffd6461..630054c03e 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bus.c @@ -63,9 +63,6 @@ ISABus *isa_bus_new(DeviceState *dev, MemoryRegion* address_space, void isa_bus_irqs(ISABus *bus, qemu_irq *irqs) { - if (!bus) { - hw_error("Can't set isa irqs with no isa bus present."); - } bus->irqs = irqs; } @@ -137,10 +134,6 @@ ISADevice *isa_create(ISABus *bus, const char *name) { DeviceState *dev; - if (!bus) { - hw_error("Tried to create isa device %s with no isa bus present.", - name); - } dev = qdev_create(BUS(bus), name); return ISA_DEVICE(dev); } @@ -149,10 +142,6 @@ ISADevice *isa_try_create(ISABus *bus, const char *name) { DeviceState *dev; - if (!bus) { - hw_error("Tried to create isa device %s with no isa bus present.", - name); - } dev = qdev_try_create(BUS(bus), name); return ISA_DEVICE(dev); }