Skip to content

Commit 8d80717

Browse files
haimdreyfussegrumbach
authored andcommitted
iwlwifi: pcie: Fix index iteration on free_irq in MSIX mode
In MSIX mode we iterate over the allocated interrupt vectors and register them to an handler. In case of registration failure, we free all the allocated irq. we use the outer index mistakenly instead of the inner one. Signed-off-by: Haim Dreyfuss <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
1 parent 9d9b21d commit 8d80717

File tree

1 file changed

+2
-2
lines changed
  • drivers/net/wireless/intel/iwlwifi/pcie

1 file changed

+2
-2
lines changed

drivers/net/wireless/intel/iwlwifi/pcie/trans.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1500,8 +1500,8 @@ static int iwl_pcie_init_msix_handler(struct pci_dev *pdev,
15001500
IWL_ERR(trans_pcie->trans,
15011501
"Error allocating IRQ %d\n", i);
15021502
for (j = 0; j < i; j++)
1503-
free_irq(trans_pcie->msix_entries[i].vector,
1504-
&trans_pcie->msix_entries[i]);
1503+
free_irq(trans_pcie->msix_entries[j].vector,
1504+
&trans_pcie->msix_entries[j]);
15051505
pci_disable_msix(pdev);
15061506
return ret;
15071507
}

0 commit comments

Comments
 (0)