[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 04/10] hw/isa/vt82c686: Reuse errp
From: |
Bernhard Beschow |
Subject: |
[PATCH v2 04/10] hw/isa/vt82c686: Reuse errp |
Date: |
Tue, 30 Aug 2022 21:00:42 +0200 |
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>
---
hw/isa/vt82c686.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
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);
--
2.37.2
- [PATCH v2 00/10] Instantiate VT82xx functions in host device, Bernhard Beschow, 2022/08/30
- [PATCH v2 04/10] hw/isa/vt82c686: Reuse errp,
Bernhard Beschow <=
- [PATCH v2 03/10] hw/isa/vt82c686: Prefer pci_address_space() over get_system_memory(), Bernhard Beschow, 2022/08/30
- [PATCH v2 01/10] hw/isa/vt82c686: Resolve chip-specific realize methods, Bernhard Beschow, 2022/08/30
- [PATCH v2 05/10] hw/isa/vt82c686: Instantiate IDE function in host device, Bernhard Beschow, 2022/08/30
- [PATCH v2 02/10] hw/isa/vt82c686: Resolve unneeded attribute, Bernhard Beschow, 2022/08/30
- [PATCH v2 06/10] hw/isa/vt82c686: Instantiate USB functions in host device, Bernhard Beschow, 2022/08/30
- [PATCH v2 09/10] hw/isa/vt82c686: Embed RTCState in host device, Bernhard Beschow, 2022/08/30
- [PATCH v2 10/10] hw/isa/vt82c686: Create rtc-time alias in boards instead, Bernhard Beschow, 2022/08/30