]> git.proxmox.com Git - mirror_qemu.git/blobdiff - hw/display/virtio-vga.c
error: Eliminate error_propagate() with Coccinelle, part 1
[mirror_qemu.git] / hw / display / virtio-vga.c
index d5cebf686f64448eda1b8966f662be862a97876b..f533d7d1b415ca48a46718bb3afc8a386993abb5 100644 (file)
@@ -93,7 +93,6 @@ static void virtio_vga_base_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
     VirtIOVGABase *vvga = VIRTIO_VGA_BASE(vpci_dev);
     VirtIOGPUBase *g = vvga->vgpu;
     VGACommonState *vga = &vvga->vga;
-    Error *err = NULL;
     uint32_t offset;
     int i;
 
@@ -138,8 +137,7 @@ static void virtio_vga_base_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
 
     /* init virtio bits */
     virtio_pci_force_virtio_1(vpci_dev);
-    if (!qdev_realize(DEVICE(g), BUS(&vpci_dev->bus), &err)) {
-        error_propagate(errp, err);
+    if (!qdev_realize(DEVICE(g), BUS(&vpci_dev->bus), errp)) {
         return;
     }