diff options
Diffstat (limited to 'hw/virtio-pci.c')
-rw-r--r-- | hw/virtio-pci.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c index d685243728..ca5f125dae 100644 --- a/hw/virtio-pci.c +++ b/hw/virtio-pci.c @@ -788,6 +788,9 @@ static int virtio_balloon_init_pci(PCIDevice *pci_dev) VirtIODevice *vdev; vdev = virtio_balloon_init(&pci_dev->qdev); + if (!vdev) { + return -1; + } virtio_init_pci(proxy, vdev); return 0; } |