qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [COMMIT 25fe365] virtio-pci: return error if virtio_conso


From: Anthony Liguori
Subject: [Qemu-commits] [COMMIT 25fe365] virtio-pci: return error if virtio_console_init fails
Date: Mon, 05 Oct 2009 14:53:34 -0000

From: Amit Shah <address@hidden>

Currently only one virtio_console device is supported. Trying to add
multiple devices fails and such failure should be reported back to the
qdev init functions.

Signed-off-by: Amit Shah <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>

diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
index 5c97629..01782e5 100644
--- a/hw/virtio-pci.c
+++ b/hw/virtio-pci.c
@@ -473,6 +473,9 @@ static int virtio_console_init_pci(PCIDevice *pci_dev)
         proxy->class_code = PCI_CLASS_COMMUNICATION_OTHER;
 
     vdev = virtio_console_init(&pci_dev->qdev);
+    if (!vdev) {
+        return -1;
+    }
     virtio_init_pci(proxy, vdev,
                     PCI_VENDOR_ID_REDHAT_QUMRANET,
                     PCI_DEVICE_ID_VIRTIO_CONSOLE,




reply via email to

[Prev in Thread] Current Thread [Next in Thread]