]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mwifiex: Fix request_irq() failure handling
authorKarthik D A <karthida@marvell.com>
Fri, 15 Jul 2016 12:48:39 +0000 (18:18 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 18 Jul 2016 19:42:19 +0000 (22:42 +0300)
It's been observed that request_irq() failure leads to a system crash
due to a bug in mwifiex driver.
When this failure happens, mwifiex_add_card() already takes care of
clearing and freeing adapter->card pointer. This patch removes the
redundant cleanup code causing crash.

Signed-off-by: Karthik D A <karthida@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/marvell/mwifiex/pcie.c

index 22fe993b7dbb66aed4dfa84c0bc4e165f3c30e3d..0faf4a2c006e88eb4b80982973c68b1fb1467aeb 100644 (file)
@@ -202,7 +202,6 @@ static int mwifiex_pcie_probe(struct pci_dev *pdev,
        if (mwifiex_add_card(card, &add_remove_card_sem, &pcie_ops,
                             MWIFIEX_PCIE)) {
                pr_err("%s failed\n", __func__);
-               kfree(card);
                return -1;
        }
 
@@ -2843,7 +2842,6 @@ static int mwifiex_pcie_request_irq(struct mwifiex_adapter *adapter)
                          "MRVL_PCIE", &card->share_irq_ctx);
        if (ret) {
                pr_err("request_irq failed: ret=%d\n", ret);
-               adapter->card = NULL;
                return -1;
        }