staging: wfx: fix double free
authorJérôme Pouiller <jerome.pouiller@silabs.com>
Tue, 5 May 2020 12:37:45 +0000 (14:37 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 May 2020 11:26:39 +0000 (13:26 +0200)
commit832cc98141b4b93acbb9231ca9e36f7fbe347f47
tree65c894b38e0b0fe0dbf7d1f070f3b76c89bb4470
parent01088cd143a9509aba2fd81d208bb4e3ba479035
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>
drivers/staging/wfx/main.c