From 16588ea5f250de7c613301897903648e527b8c24 Mon Sep 17 00:00:00 2001 From: Mike Ryan Date: Fri, 12 Nov 2010 15:13:29 -0800 Subject: [PATCH 1/2] return an error code if the virtio-9p-pci driver cannot be initialized --- 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 79f4906..8eb7431 100644 --- a/hw/virtio-pci.c +++ b/hw/virtio-pci.c @@ -674,6 +674,9 @@ static int virtio_9p_init_pci(PCIDevice *pci_dev) VirtIODevice *vdev; vdev = virtio_9p_init(&pci_dev->qdev, &proxy->fsconf); + if (vdev == NULL) { + return -1; + } virtio_init_pci(proxy, vdev, PCI_VENDOR_ID_REDHAT_QUMRANET, 0x1009, -- 1.7.0.4