mwifiex: add NULL checks in driver unload path
authorAmitkumar Karwar <akarwar@marvell.com>
Sat, 4 Feb 2012 04:34:02 +0000 (20:34 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 6 Feb 2012 16:34:02 +0000 (11:34 -0500)
commit2da8cbf8a6b454296c9db7b57cac72d5a39e3aa7
tree6c936d599c04ebf8e4979162de896c6017d64a48
parent07445f688218a48bde72316aed9de4fdcc173131
mwifiex: add NULL checks in driver unload path

If driver load is failed, sometimes few pointers may remain
uninitialized ex. priv->wdev, priv->netdev, adapter->sleep_cfm
This will cause NULL pointer dereferance while unloading the
driver.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwifiex/init.c
drivers/net/wireless/mwifiex/main.c