X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=hw%2Fvmware_vga.h;h=5132573a56f3ad239642201cf568c19e24629110;hb=a80f53aee36f177203a2d4e7a046dc0365e42150;hp=e7bcb22146f4c2d7e290e5eee33d9c16f1dc1127;hpb=5c81e4ca9e5c11239a9db12f0f57c6c1e24b6760;p=qemu.git diff --git a/hw/vmware_vga.h b/hw/vmware_vga.h index e7bcb2214..5132573a5 100644 --- a/hw/vmware_vga.h +++ b/hw/vmware_vga.h @@ -4,9 +4,16 @@ #include "qemu-common.h" /* vmware_vga.c */ -static inline void pci_vmsvga_init(PCIBus *bus) +static inline bool pci_vmsvga_init(PCIBus *bus) { - pci_create_simple(bus, -1, "vmware-svga"); + PCIDevice *dev; + + dev = pci_try_create(bus, -1, "vmware-svga"); + if (!dev || qdev_init(&dev->qdev) < 0) { + return false; + } else { + return true; + } } #endif