Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7ba1930d authored by Hidetoshi Seto's avatar Hidetoshi Seto Committed by Jesse Barnes
Browse files

PCI MSI: Unmask MSI if setup failed



The initial state of mask register of MSI is unmasked.  We set it
masked before calling arch_setup_msi_irqs().  If arch_setup_msi_irq()
fails, it is better to restore the state of the mask register.

Reviewed-by: default avatarMatthew Wilcox <willy@linux.intel.com>
Signed-off-by: default avatarHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
parent 2c21fd4b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -383,6 +383,7 @@ static int msi_capability_init(struct pci_dev *dev, int nvec)
	/* Configure MSI capability structure */
	ret = arch_setup_msi_irqs(dev, nvec, PCI_CAP_ID_MSI);
	if (ret) {
		msi_mask_irq(entry, mask, ~mask);
		msi_free_irqs(dev);
		return ret;
	}