aboutsummaryrefslogtreecommitdiff
path: root/hw/display/virtio-vga.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/display/virtio-vga.c')
-rw-r--r--hw/display/virtio-vga.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/display/virtio-vga.c b/hw/display/virtio-vga.c
index 67f409e106..0fc00fee1f 100644
--- a/hw/display/virtio-vga.c
+++ b/hw/display/virtio-vga.c
@@ -138,8 +138,7 @@ static void virtio_vga_base_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
/* init virtio bits */
virtio_pci_force_virtio_1(vpci_dev);
- qdev_realize(DEVICE(g), BUS(&vpci_dev->bus), &err);
- if (err) {
+ if (!qdev_realize(DEVICE(g), BUS(&vpci_dev->bus), &err)) {
error_propagate(errp, err);
return;
}