mwifiex: fix adapter pointer dereference issue
authorAmitkumar Karwar <akarwar@marvell.com>
Wed, 31 Jul 2013 00:18:15 +0000 (17:18 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 1 Aug 2013 19:34:35 +0000 (15:34 -0400)
commitc3afd99fb5adfb31925f0b493a0d4152cd6447cc
treeab32f800a9ef13b1a328018232ed8fa1639b45cd
parent7546ff95499781306e8fd7d84ae38b84be961364
mwifiex: fix adapter pointer dereference issue

It has introduced by recent commit 6b41f941d7cd: "mwifiex:
handle driver initialization error paths" which adds error
path handling for mwifiex_fw_dpc().

release_firmware(adapter->*) is called for success as well
as failure paths. In failure paths, adapter is already freed
at this point.

The issue is fixed by moving mwifiex_free_adapter() call.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwifiex/main.c