diff options
| author | Thadeu Lima de Souza Cascardo <[email protected]> | 2024-11-07 13:33:22 +0000 |
|---|---|---|
| committer | Ping-Ke Shih <[email protected]> | 2024-11-18 01:50:35 +0000 |
| commit | f79bc5c67867c19ce2762e7934c20dbb835ed82c (patch) | |
| tree | 6047c15eeace3db92e63263e7bdf0519c1a33fe6 /drivers/net/wireless/realtek/rtlwifi/usb.c | |
| parent | wifi: rtlwifi: fix init_sw_vars leak when probe fails (diff) | |
| download | kernel-f79bc5c67867c19ce2762e7934c20dbb835ed82c.tar.gz kernel-f79bc5c67867c19ce2762e7934c20dbb835ed82c.zip | |
wifi: rtlwifi: usb: fix workqueue leak when probe fails
rtl_init_core creates a workqueue that is then assigned to rtl_wq.
rtl_deinit_core does not destroy it. It is left to rtl_usb_deinit, which
must be called in the probe error path.
Fixes: 2ca20f79e0d8 ("rtlwifi: Add usb driver")
Fixes: 851639fdaeac ("rtlwifi: Modify some USB de-initialize code.")
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Ping-Ke Shih <[email protected]>
Link: https://patch.msgid.link/[email protected]
Diffstat (limited to 'drivers/net/wireless/realtek/rtlwifi/usb.c')
| -rw-r--r-- | drivers/net/wireless/realtek/rtlwifi/usb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/usb.c b/drivers/net/wireless/realtek/rtlwifi/usb.c index 8ec687fab572..0368ecea2e81 100644 --- a/drivers/net/wireless/realtek/rtlwifi/usb.c +++ b/drivers/net/wireless/realtek/rtlwifi/usb.c @@ -1039,6 +1039,7 @@ error_init_vars: wait_for_completion(&rtlpriv->firmware_loading_complete); rtlpriv->cfg->ops->deinit_sw_vars(hw); error_out: + rtl_usb_deinit(hw); rtl_deinit_core(hw); error_out2: _rtl_usb_io_handler_release(hw); |
