aboutsummaryrefslogtreecommitdiff
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 41b88b8..357fefa 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;
}