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>
This commit is contained in:
		
							parent
							
								
									baef8a666c
								
							
						
					
					
						commit
						3174ecd128
					
				| 
						 | 
					@ -255,6 +255,7 @@ int msix_init(struct PCIDevice *dev, unsigned short nentries,
 | 
				
			||||||
    return 0;
 | 
					    return 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
err_config:
 | 
					err_config:
 | 
				
			||||||
 | 
					    dev->msix_entries_nr = 0;
 | 
				
			||||||
    cpu_unregister_io_memory(dev->msix_mmio_index);
 | 
					    cpu_unregister_io_memory(dev->msix_mmio_index);
 | 
				
			||||||
err_index:
 | 
					err_index:
 | 
				
			||||||
    qemu_free(dev->msix_table_page);
 | 
					    qemu_free(dev->msix_table_page);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue