rtlwifi: Fix PCI probe error path orphaned memory
authorTim Gardner <tim.gardner@canonical.com>
Thu, 2 Feb 2012 20:48:06 +0000 (13:48 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 6 Feb 2012 19:55:52 +0000 (14:55 -0500)
commit3d86b93064c7f18378a2008bab9608ca7d11bdbb
treedad5a3e5e53a7b87397472599d00d0fc0dae6137
parent885bd8eca6ac172e299750d99bd5c9fddbed89b9
rtlwifi: Fix PCI probe error path orphaned memory

Memory allocated by ieee80211_alloc_hw() will get orphaned
if any subsequent initializations fail.

Also don't pci_set_drvdata(pdev, NULL) until just before disabling
the PCI device. Functions called by rtl_deinit_core(hw) may eventually need
the context (when its actually implemented).

Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Chaoming Li <chaoming_li@realsil.com.cn>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rtlwifi/pci.c