diff options
author | Brian Norris <briannorris@chromium.org> | 2017-07-24 18:13:34 -0700 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2017-07-28 17:47:54 +0300 |
commit | 43a0c9aea64d50d126bc2d7babecc8a2a2b21e59 (patch) | |
tree | eac82ff5e8631a7092a04bcbdd040732f76b5c3b /drivers/net/wireless/marvell | |
parent | 2f47150ab3efd338ccdf75bae9f91ec147d6d98b (diff) | |
download | op-kernel-dev-43a0c9aea64d50d126bc2d7babecc8a2a2b21e59.zip op-kernel-dev-43a0c9aea64d50d126bc2d7babecc8a2a2b21e59.tar.gz |
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>
Diffstat (limited to 'drivers/net/wireless/marvell')
-rw-r--r-- | drivers/net/wireless/marvell/mwifiex/pcie.c | 13 |
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 fc42697..3da1eeb 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); } |