mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 02:24:24 +02:00
PCI/MSI: Unmap MSI-X region on error
msix_capability_init() fails to unmap the MSI-X region if msix_setup_interrupts() fails. Add the missing iounmap() for that error path. [ tglx: Massaged change log ] Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Link: https://patch.msgid.link/20260125144452.2103812-1-lihaoxiang@isrc.iscas.ac.cn
This commit is contained in:
parent
df439718af
commit
1a8d4c6ecb
|
|
@ -737,7 +737,7 @@ static int msix_capability_init(struct pci_dev *dev, struct msix_entry *entries,
|
|||
|
||||
ret = msix_setup_interrupts(dev, entries, nvec, affd);
|
||||
if (ret)
|
||||
goto out_disable;
|
||||
goto out_unmap;
|
||||
|
||||
/* Disable INTX */
|
||||
pci_intx_for_msi(dev, 0);
|
||||
|
|
@ -758,6 +758,8 @@ static int msix_capability_init(struct pci_dev *dev, struct msix_entry *entries,
|
|||
pcibios_free_irq(dev);
|
||||
return 0;
|
||||
|
||||
out_unmap:
|
||||
iounmap(dev->msix_base);
|
||||
out_disable:
|
||||
dev->msix_enabled = 0;
|
||||
pci_msix_clear_and_set_ctrl(dev, PCI_MSIX_FLAGS_MASKALL | PCI_MSIX_FLAGS_ENABLE, 0);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user