diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2016-05-17 23:16:01 (GMT) |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2016-06-14 14:21:28 (GMT) |
commit | 141bcf099076df1a74317a5b14dcd56c933b9de8 (patch) | |
tree | 01f41a083d648e5df466f758e6ce7ba612e9fddc | |
parent | 6b3c33e985f20e7de07fc4b9b1a96dc452e37cb4 (diff) | |
download | linux-141bcf099076df1a74317a5b14dcd56c933b9de8.tar.xz |
mwiflex: avoid possible null pointer dereference
Do not dereference card before checking against NULL value.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-rw-r--r-- | drivers/net/wireless/marvell/mwifiex/pcie.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c index 9246ce8..a35db02 100644 --- a/drivers/net/wireless/marvell/mwifiex/pcie.c +++ b/drivers/net/wireless/marvell/mwifiex/pcie.c @@ -2901,10 +2901,11 @@ static void mwifiex_unregister_dev(struct mwifiex_adapter *adapter) { struct pcie_service_card *card = adapter->card; const struct mwifiex_pcie_card_reg *reg; - struct pci_dev *pdev = card->dev; + struct pci_dev *pdev; int i; if (card) { + pdev = card->dev; if (card->msix_enable) { for (i = 0; i < MWIFIEX_NUM_MSIX_VECTORS; i++) synchronize_irq(card->msix_entries[i].vector); |