aboutsummaryrefslogtreecommitdiff
path: root/hw/isa
diff options
context:
space:
mode:
authorBernhard Beschow <shentey@gmail.com>2022-09-01 13:41:18 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2022-10-31 11:32:07 +0100
commitc1561d1deba5a58c49b57afb72785e70ccb08dc9 (patch)
tree39997685017e6b469fa4ab66f54f8134a6a1960f /hw/isa
parentdd28cc87aa0295743b577145a8afc76cc9292618 (diff)
hw/isa/vt82c686: Reuse errp
Rather than terminating abruptly, make use of the already present errp and propagate the error to the caller. Signed-off-by: Bernhard Beschow <shentey@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220901114127.53914-5-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'hw/isa')
-rw-r--r--hw/isa/vt82c686.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c
index 5582c0b179..37e37b3855 100644
--- a/hw/isa/vt82c686.c
+++ b/hw/isa/vt82c686.c
@@ -590,7 +590,12 @@ static void via_isa_realize(PCIDevice *d, Error **errp)
qdev_init_gpio_out(dev, &s->cpu_intr, 1);
isa_irq = qemu_allocate_irqs(via_isa_request_i8259_irq, s, 1);
isa_bus = isa_bus_new(dev, pci_address_space(d), pci_address_space_io(d),
- &error_fatal);
+ errp);
+
+ if (!isa_bus) {
+ return;
+ }
+
s->isa_irqs = i8259_init(isa_bus, *isa_irq);
isa_bus_irqs(isa_bus, s->isa_irqs);
i8254_pit_init(isa_bus, 0x40, 0, NULL);