From 6832deb8ff0807e0b46a8a67f5d2abfa36ca3b47 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Thu, 17 Mar 2022 09:30:25 +0100 Subject: hw/display: Allow vga_common_init() to return errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The vga_common_init() function currently cannot report errors to its caller. But in the following patch, we'd need this possibility, so let's change it to take an "Error **" as parameter for this. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220317083027.16688-3-thuth@redhat.com> Signed-off-by: Gerd Hoffmann --- hw/display/vga-isa.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'hw/display/vga-isa.c') diff --git a/hw/display/vga-isa.c b/hw/display/vga-isa.c index 90851e7..46abbc5 100644 --- a/hw/display/vga-isa.c +++ b/hw/display/vga-isa.c @@ -62,7 +62,10 @@ static void vga_isa_realizefn(DeviceState *dev, Error **errp) const MemoryRegionPortio *vga_ports, *vbe_ports; s->global_vmstate = true; - vga_common_init(s, OBJECT(dev)); + if (!vga_common_init(s, OBJECT(dev), errp)) { + return; + } + s->legacy_address_space = isa_address_space(isadev); vga_io_memory = vga_init_io(s, OBJECT(dev), &vga_ports, &vbe_ports); isa_register_portio_list(isadev, &d->portio_vga, -- cgit v1.1