summaryrefslogtreecommitdiff
path: root/drivers/staging/wfx/main.c
diff options
context:
space:
mode:
authorJérôme Pouiller <jerome.pouiller@silabs.com>2020-05-05 14:37:45 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-13 13:26:39 +0200
commit832cc98141b4b93acbb9231ca9e36f7fbe347f47 (patch)
tree65c894b38e0b0fe0dbf7d1f070f3b76c89bb4470 /drivers/staging/wfx/main.c
parent01088cd143a9509aba2fd81d208bb4e3ba479035 (diff)
staging: wfx: fix double free
In case of error in wfx_probe(), wdev->hw is freed. Since an error occurred, wfx_free_common() is called, then wdev->hw is freed again. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Reviewed-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Fixes: 4033714d6cbe ("staging: wfx: fix init/remove vs IRQ race") Link: https://lore.kernel.org/r/20200505123757.39506-4-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wfx/main.c')
-rw-r--r--drivers/staging/wfx/main.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c
index ba2e3a6b3549..5d0754b55429 100644
--- a/drivers/staging/wfx/main.c
+++ b/drivers/staging/wfx/main.c
@@ -469,7 +469,6 @@ int wfx_probe(struct wfx_dev *wdev)
err2:
ieee80211_unregister_hw(wdev->hw);
- ieee80211_free_hw(wdev->hw);
err1:
wfx_bh_unregister(wdev);
return err;