mwifiex: fix issues in driver unload path for USB chipsets
authorUjjal Roy <royujjal@gmail.com>
Fri, 15 Nov 2013 03:10:42 +0000 (19:10 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 15 Nov 2013 19:29:32 +0000 (14:29 -0500)
commit353d2a69ea2607acd80c6bea7da2ab9bb65d2622
treed1628b0f620d60ea8afbd531ca2373a20b5a7732
parent3c59e328eb4ff23781bfa4cfc9f6f496003bf8b9
mwifiex: fix issues in driver unload path for USB chipsets

1) After driver load failure, clear 'card->adapter' instead of
card pointer so that card specific cleanup is performed later
when user unloads the driver.

2) Clear usb_card pointer in disconnect handler to avoid invalid
memory access when user unloads the driver after removing the
card.

Signed-off-by: Ujjal Roy <royujjal@gmail.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/usb.c