Commit 141bcf09 authored by Heinrich Schuchardt's avatar Heinrich Schuchardt Committed by Kalle Valo

mwiflex: avoid possible null pointer dereference

Do not dereference card before checking against NULL value.
Signed-off-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 6b3c33e9
...@@ -2901,10 +2901,11 @@ static void mwifiex_unregister_dev(struct mwifiex_adapter *adapter) ...@@ -2901,10 +2901,11 @@ static void mwifiex_unregister_dev(struct mwifiex_adapter *adapter)
{ {
struct pcie_service_card *card = adapter->card; struct pcie_service_card *card = adapter->card;
const struct mwifiex_pcie_card_reg *reg; const struct mwifiex_pcie_card_reg *reg;
struct pci_dev *pdev = card->dev; struct pci_dev *pdev;
int i; int i;
if (card) { if (card) {
pdev = card->dev;
if (card->msix_enable) { if (card->msix_enable) {
for (i = 0; i < MWIFIEX_NUM_MSIX_VECTORS; i++) for (i = 0; i < MWIFIEX_NUM_MSIX_VECTORS; i++)
synchronize_irq(card->msix_entries[i].vector); synchronize_irq(card->msix_entries[i].vector);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment