aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
diff options
context:
space:
mode:
authorXiu Jianfeng <[email protected]>2022-11-09 03:52:13 +0000
committerMiri Korenblit <[email protected]>2025-06-25 07:57:34 +0000
commited2e916c890944633d6826dce267579334f63ea5 (patch)
tree239d7e4462803a8696f8b1e5175ee46ca448a21f /drivers/net/wireless/intel/iwlwifi/mvm/ops.c
parentiwlwifi: api: delete repeated words (diff)
downloadkernel-ed2e916c890944633d6826dce267579334f63ea5.tar.gz
kernel-ed2e916c890944633d6826dce267579334f63ea5.zip
wifi: iwlwifi: Fix memory leak in iwl_mvm_init()
When iwl_opmode_register() fails, it does not unregster rate control, which will cause a memory leak issue, this patch fixes it. Fixes: 9f66a397c877 ("iwlwifi: mvm: rs: add ops for the new rate scaling in the FW") Signed-off-by: Xiu Jianfeng <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Miri Korenblit <[email protected]>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/ops.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/ops.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
index a2dc5c3b0596..1c05a3d8e424 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
@@ -61,8 +61,10 @@ static int __init iwl_mvm_init(void)
}
ret = iwl_opmode_register("iwlmvm", &iwl_mvm_ops);
- if (ret)
+ if (ret) {
pr_err("Unable to register MVM op_mode: %d\n", ret);
+ iwl_mvm_rate_control_unregister();
+ }
return ret;
}