summary refs log tree commit diff stats
path: root/hw/display/virtio-gpu-pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/display/virtio-gpu-pci.c')
-rw-r--r--hw/display/virtio-gpu-pci.c4
1 files changed, 1 insertions, 3 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;
     }