diff options
Diffstat (limited to 'hw/display')
-rw-r--r-- | hw/display/virtio-gpu-pci.c | 4 | ||||
-rw-r--r-- | hw/display/virtio-vga.c | 3 |
2 files changed, 2 insertions, 5 deletions
diff --git a/hw/display/virtio-gpu-pci.c b/hw/display/virtio-gpu-pci.c index 41b88b878d..357fefa3c0 100644 --- a/hw/display/virtio-gpu-pci.c +++ b/hw/display/virtio-gpu-pci.c @@ -34,9 +34,7 @@ static void virtio_gpu_pci_base_realize(VirtIOPCIProxy *vpci_dev, Error **errp) Error *local_error = NULL; virtio_pci_force_virtio_1(vpci_dev); - qdev_realize(vdev, BUS(&vpci_dev->bus), &local_error); - - if (local_error) { + if (!qdev_realize(vdev, BUS(&vpci_dev->bus), &local_error)) { error_propagate(errp, local_error); return; } 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; } |