]> git.proxmox.com Git - qemu.git/commitdiff
qemu: msix nit: clear msix_entries_nr on error
authorMichael S. Tsirkin <mst@redhat.com>
Wed, 22 Jul 2009 15:51:14 +0000 (18:51 +0300)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 29 Jul 2009 16:38:07 +0000 (11:38 -0500)
I don't think it's critical to do this, but it's
best to keep uninit and error recovery consistent.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/msix.c

index 3420ce9b242fda63b1224e0f43ed27ed784fe916..c954d471c2b9ff0b18e47f9ac77efd6b74a2cb73 100644 (file)
--- a/hw/msix.c
+++ b/hw/msix.c
@@ -255,6 +255,7 @@ int msix_init(struct PCIDevice *dev, unsigned short nentries,
     return 0;
 
 err_config:
+    dev->msix_entries_nr = 0;
     cpu_unregister_io_memory(dev->msix_mmio_index);
 err_index:
     qemu_free(dev->msix_table_page);