summaryrefslogtreecommitdiffstats
path: root/hw/display/virtio-vga.c
diff options
context:
space:
mode:
authorThomas Huth2022-03-17 09:30:25 +0100
committerGerd Hoffmann2022-03-18 10:15:57 +0100
commit6832deb8ff0807e0b46a8a67f5d2abfa36ca3b47 (patch)
tree449b34641837d3930a2f6dcf645cda3696a4d432 /hw/display/virtio-vga.c
parenthw/display/cirrus_vga: Clean up indentation in pci_cirrus_vga_realize() (diff)
downloadqemu-6832deb8ff0807e0b46a8a67f5d2abfa36ca3b47.tar.gz
qemu-6832deb8ff0807e0b46a8a67f5d2abfa36ca3b47.tar.xz
qemu-6832deb8ff0807e0b46a8a67f5d2abfa36ca3b47.zip
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/virtio-vga.c')
-rw-r--r--hw/display/virtio-vga.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/display/virtio-vga.c b/hw/display/virtio-vga.c
index 5a2f7a4540..7b55c8d0e7 100644
--- a/hw/display/virtio-vga.c
+++ b/hw/display/virtio-vga.c
@@ -108,7 +108,9 @@ static void virtio_vga_base_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
/* init vga compat bits */
vga->vram_size_mb = 8;
- vga_common_init(vga, OBJECT(vpci_dev));
+ if (!vga_common_init(vga, OBJECT(vpci_dev), errp)) {
+ return;
+ }
vga_init(vga, OBJECT(vpci_dev), pci_address_space(&vpci_dev->pci_dev),
pci_address_space_io(&vpci_dev->pci_dev), true);
pci_register_bar(&vpci_dev->pci_dev, 0,