mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
MSI: Robust resource release
msi_init may fail, so we need to check on uninit if the cap was actually installed. This also avoids that the users need to check. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
072476ea08
commit
45fe15c25a
3 changed files with 12 additions and 9 deletions
|
@ -1165,9 +1165,7 @@ static int intel_hda_exit(PCIDevice *pci)
|
|||
{
|
||||
IntelHDAState *d = DO_UPCAST(IntelHDAState, pci, pci);
|
||||
|
||||
if (d->msi) {
|
||||
msi_uninit(&d->pci);
|
||||
}
|
||||
msi_uninit(&d->pci);
|
||||
cpu_unregister_io_memory(d->mmio_addr);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue