summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Norris <briannorris@chromium.org>2017-07-24 18:13:34 -0700
committerKalle Valo <kvalo@codeaurora.org>2017-07-28 17:47:54 +0300
commit43a0c9aea64d50d126bc2d7babecc8a2a2b21e59 (patch)
treeeac82ff5e8631a7092a04bcbdd040732f76b5c3b
parent2f47150ab3efd338ccdf75bae9f91ec147d6d98b (diff)
mwifiex: pcie: remove unnecessary 'pdev' check
'card->dev' is initialized once and is never cleared. Drop the unnecessary "safety" check, as it simply obscures things, and we don't do this check everywhere (and therefore it's not really "safe"). Signed-off-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-rw-r--r--drivers/net/wireless/marvell/mwifiex/pcie.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
index fc42697d7ec8..3da1eeb730eb 100644
--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
@@ -2971,15 +2971,12 @@ static void mwifiex_cleanup_pcie(struct mwifiex_adapter *adapter)
"Failed to write driver not-ready signature\n");
}
- if (pdev) {
- pci_disable_device(pdev);
+ pci_disable_device(pdev);
- pci_iounmap(pdev, card->pci_mmap);
- pci_iounmap(pdev, card->pci_mmap1);
- pci_disable_device(pdev);
- pci_release_region(pdev, 2);
- pci_release_region(pdev, 0);
- }
+ pci_iounmap(pdev, card->pci_mmap);
+ pci_iounmap(pdev, card->pci_mmap1);
+ pci_release_region(pdev, 2);
+ pci_release_region(pdev, 0);
mwifiex_pcie_free_buffers(adapter);
}