mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 16:29:59 +00:00
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: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
This commit is contained in:
parent
2c21fd4b33
commit
7ba1930db0
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue