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/ati.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'hw/display/ati.c') diff --git a/hw/display/ati.c b/hw/display/ati.c index 31f22754dc..6e38e00502 100644 --- a/hw/display/ati.c +++ b/hw/display/ati.c @@ -955,7 +955,9 @@ static void ati_vga_realize(PCIDevice *dev, Error **errp) } /* init vga bits */ - vga_common_init(vga, OBJECT(s)); + if (!vga_common_init(vga, OBJECT(s), errp)) { + return; + } vga_init(vga, OBJECT(s), pci_address_space(dev), pci_address_space_io(dev), true); vga->con = graphic_console_init(DEVICE(s), 0, s->vga.hw_ops, &s->vga); -- cgit v1.2.3