From: Heinrich Schuchardt Date: Tue, 17 May 2016 23:16:01 +0000 (+0200) Subject: mwiflex: avoid possible null pointer dereference X-Git-Tag: v4.8-rc1~140^2~279^2~37 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=141bcf099076df1a74317a5b14dcd56c933b9de8;p=platform%2Fkernel%2Flinux-exynos.git mwiflex: avoid possible null pointer dereference Do not dereference card before checking against NULL value. Signed-off-by: Heinrich Schuchardt Signed-off-by: Kalle Valo --- 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);