aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
diff options
context:
space:
mode:
authorTong Zhang <ztong0001@gmail.com>2022-02-23 22:40:31 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-02-25 10:08:32 +0100
commit57078a3c2e24fcc1ee8b7d44b69d27dba41c6598 (patch)
tree43bde3ff7af0b68c95e5c9f7c049147618c675c5 /drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
parentstaging: rtl8192u: add empty debug functions (diff)
downloadlinux-dev-57078a3c2e24fcc1ee8b7d44b69d27dba41c6598.tar.xz
linux-dev-57078a3c2e24fcc1ee8b7d44b69d27dba41c6598.zip
staging: rtl8192u: rework init and exit function
The init and exit functions are not releasing resource properly. An error can be observed when we load/unload/load r8192u_usb module due to this issue. This patch rework init and exit functions to do proper resource release on init error and module unload. The __exit attribute is stripped from some functions since they are now being used by module init functions. [ 493.068012] proc_dir_entry 'net/ieee80211' already registered [ 493.271973] proc_mkdir+0x18/0x20 [ 493.272136] ieee80211_debug_init+0x28/0xde8 [r8192u_usb] [ 493.272404] rtl8192_usb_module_init+0x10/0x161 [r8192u_usb] [ 13.910616] proc_dir_entry 'net/rtl819xU' already registered [ 13.918931] proc_mkdir+0x18/0x20 [ 13.919098] rtl8192_usb_module_init+0x142/0x16d [r8192u_usb] Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Tong Zhang <ztong0001@gmail.com> Link: https://lore.kernel.org/r/20220224064033.1530924-3-ztong0001@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c')
-rw-r--r--drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
index 01012dddcd73..840db6250b87 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
@@ -214,7 +214,7 @@ out:
return ret;
}
-void __exit ieee80211_crypto_deinit(void)
+void ieee80211_crypto_deinit(void)
{
struct list_head *ptr, *n;