aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2009-07-22 18:51:14 +0300
committerAnthony Liguori <aliguori@us.ibm.com>2009-07-27 14:09:14 -0500
commit3174ecd128ba5a4dc67de2a23cf2d385af1c4e70 (patch)
treeb1424ffc29e2923636299a0dfafa4a4024e9f8b2
parentbaef8a666c137fae513a195c8abeb80e1806d7bd (diff)
downloadqemu-3174ecd128ba5a4dc67de2a23cf2d385af1c4e70.zip
qemu-3174ecd128ba5a4dc67de2a23cf2d385af1c4e70.tar.gz
qemu-3174ecd128ba5a4dc67de2a23cf2d385af1c4e70.tar.bz2
qemu: msix nit: clear msix_entries_nr on error
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>
-rw-r--r--hw/msix.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/msix.c b/hw/msix.c
index 3420ce9..c954d47 100644
--- 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);