Skip to contentSkip to conversation

qemu: msix nit: clear msix_entries_nr on error

PATCH New Michael S. Tsirkin 1 participant 1 message Jul 22, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 hw/msix.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
hw/msix.c +1 -0
index 4ab6da6..932deea 100644
@@ -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);
Signature · 1 line
1.6.2.5