diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2016-05-18 01:16:01 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2016-06-14 17:21:28 +0300 |
commit | 141bcf099076df1a74317a5b14dcd56c933b9de8 (patch) | |
tree | 01f41a083d648e5df466f758e6ce7ba612e9fddc /drivers/net/wireless/marvell/mwifiex/pcie.c | |
parent | 6b3c33e985f20e7de07fc4b9b1a96dc452e37cb4 (diff) | |
download | lwn-141bcf099076df1a74317a5b14dcd56c933b9de8.tar.gz lwn-141bcf099076df1a74317a5b14dcd56c933b9de8.zip |
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>
Diffstat (limited to 'drivers/net/wireless/marvell/mwifiex/pcie.c')
-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 9246ce890e6d..a35db02858b6 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); |