msix: Switch msix_uninit to return void

It can't fail.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
Alex Williamson 2012-06-14 12:16:57 -06:00 committed by Michael S. Tsirkin
parent 5a2c202981
commit 572992eefa
2 changed files with 5 additions and 5 deletions

View file

@ -328,10 +328,10 @@ static void msix_free_irq_entries(PCIDevice *dev)
} }
/* Clean up resources for the device. */ /* Clean up resources for the device. */
int msix_uninit(PCIDevice *dev, MemoryRegion *table_bar, MemoryRegion *pba_bar) void msix_uninit(PCIDevice *dev, MemoryRegion *table_bar, MemoryRegion *pba_bar)
{ {
if (!msix_present(dev)) { if (!msix_present(dev)) {
return 0; return;
} }
pci_del_capability(dev, PCI_CAP_ID_MSIX, MSIX_CAP_LENGTH); pci_del_capability(dev, PCI_CAP_ID_MSIX, MSIX_CAP_LENGTH);
dev->msix_cap = 0; dev->msix_cap = 0;
@ -348,7 +348,7 @@ int msix_uninit(PCIDevice *dev, MemoryRegion *table_bar, MemoryRegion *pba_bar)
g_free(dev->msix_entry_used); g_free(dev->msix_entry_used);
dev->msix_entry_used = NULL; dev->msix_entry_used = NULL;
dev->cap_present &= ~QEMU_PCI_CAP_MSIX; dev->cap_present &= ~QEMU_PCI_CAP_MSIX;
return 0; return;
} }
void msix_uninit_exclusive_bar(PCIDevice *dev) void msix_uninit_exclusive_bar(PCIDevice *dev)

View file

@ -13,7 +13,7 @@ int msix_init_exclusive_bar(PCIDevice *dev, unsigned short nentries,
void msix_write_config(PCIDevice *dev, uint32_t address, uint32_t val, int len); void msix_write_config(PCIDevice *dev, uint32_t address, uint32_t val, int len);
int msix_uninit(PCIDevice *dev, MemoryRegion *table_bar, void msix_uninit(PCIDevice *dev, MemoryRegion *table_bar,
MemoryRegion *pba_bar); MemoryRegion *pba_bar);
void msix_uninit_exclusive_bar(PCIDevice *dev); void msix_uninit_exclusive_bar(PCIDevice *dev);