Fix a logic bug in the split PCI interrupt code that slipped through
Reported by: Harry Schmalzbauer
This commit is contained in:
parent
76925ae8c9
commit
58fdb26bf8
@ -260,6 +260,7 @@ mpr_pci_alloc_interrupts(struct mpr_softc *sc)
|
||||
|
||||
dev = sc->mpr_dev;
|
||||
error = 0;
|
||||
msgs = 0;
|
||||
|
||||
if ((sc->disable_msix == 0) &&
|
||||
((msgs = pci_msix_count(dev)) >= MPR_MSI_COUNT))
|
||||
@ -267,7 +268,7 @@ mpr_pci_alloc_interrupts(struct mpr_softc *sc)
|
||||
if ((error != 0) && (sc->disable_msi == 0) &&
|
||||
((msgs = pci_msi_count(dev)) >= MPR_MSI_COUNT))
|
||||
error = mpr_alloc_msi(sc, MPR_MSI_COUNT);
|
||||
else
|
||||
if (error != 0)
|
||||
msgs = 0;
|
||||
|
||||
sc->msi_msgs = msgs;
|
||||
|
@ -245,6 +245,7 @@ mps_pci_alloc_interrupts(struct mps_softc *sc)
|
||||
|
||||
dev = sc->mps_dev;
|
||||
error = 0;
|
||||
msgs = 0;
|
||||
|
||||
if ((sc->disable_msix == 0) &&
|
||||
((msgs = pci_msix_count(dev)) >= MPS_MSI_COUNT))
|
||||
@ -252,7 +253,7 @@ mps_pci_alloc_interrupts(struct mps_softc *sc)
|
||||
if ((error != 0) && (sc->disable_msi == 0) &&
|
||||
((msgs = pci_msi_count(dev)) >= MPS_MSI_COUNT))
|
||||
error = mps_alloc_msi(sc, MPS_MSI_COUNT);
|
||||
else
|
||||
if (error != 0)
|
||||
msgs = 0;
|
||||
|
||||
sc->msi_msgs = msgs;
|
||||
|
Loading…
Reference in New Issue
Block a user