Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck...
[linux-drm-fsl-dcu.git] / drivers / net / wireless / mwifiex / pcie.c
index 33fa9432b241b353c3ae381ab57c48d5d71f763b..03688aa14e8adb8575163e3a40aeda4a70a32c19 100644 (file)
@@ -232,7 +232,6 @@ static void mwifiex_pcie_remove(struct pci_dev *pdev)
        }
 
        mwifiex_remove_card(card->adapter, &add_remove_card_sem);
-       kfree(card);
 }
 
 static void mwifiex_pcie_shutdown(struct pci_dev *pdev)
@@ -2313,6 +2312,7 @@ static void mwifiex_pcie_cleanup(struct mwifiex_adapter *adapter)
                pci_release_region(pdev, 0);
                pci_set_drvdata(pdev, NULL);
        }
+       kfree(card);
 }
 
 /*