aboutsummaryrefslogtreecommitdiff
path: root/hw/display/vga-mmio.c
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2022-03-17 09:30:25 +0100
committerGerd Hoffmann <kraxel@redhat.com>2022-03-18 10:15:57 +0100
commit6832deb8ff0807e0b46a8a67f5d2abfa36ca3b47 (patch)
tree449b34641837d3930a2f6dcf645cda3696a4d432 /hw/display/vga-mmio.c
parent5f2011be44b8d17f93680d01d617cd9a96678886 (diff)
downloadqemu-6832deb8ff0807e0b46a8a67f5d2abfa36ca3b47.zip
qemu-6832deb8ff0807e0b46a8a67f5d2abfa36ca3b47.tar.gz
qemu-6832deb8ff0807e0b46a8a67f5d2abfa36ca3b47.tar.bz2
hw/display: Allow vga_common_init() to return errors
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 <thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220317083027.16688-3-thuth@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/display/vga-mmio.c')
-rw-r--r--hw/display/vga-mmio.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/display/vga-mmio.c b/hw/display/vga-mmio.c
index 4969368..75dfced 100644
--- a/hw/display/vga-mmio.c
+++ b/hw/display/vga-mmio.c
@@ -102,7 +102,10 @@ static void vga_mmio_realizefn(DeviceState *dev, Error **errp)
s->vga.bank_offset = 0;
s->vga.global_vmstate = true;
- vga_common_init(&s->vga, OBJECT(dev));
+ if (!vga_common_init(&s->vga, OBJECT(dev), errp)) {
+ return;
+ }
+
sysbus_init_mmio(sbd, &s->vga.vram);
s->vga.con = graphic_console_init(dev, 0, s->vga.hw_ops, &s->vga);
}