diff options
| author | Xiu Jianfeng <[email protected]> | 2022-11-09 03:52:13 +0000 |
|---|---|---|
| committer | Miri Korenblit <[email protected]> | 2025-06-25 07:57:34 +0000 |
| commit | ed2e916c890944633d6826dce267579334f63ea5 (patch) | |
| tree | 239d7e4462803a8696f8b1e5175ee46ca448a21f /drivers/net/wireless/intel/iwlwifi/mvm/ops.c | |
| parent | iwlwifi: api: delete repeated words (diff) | |
| download | kernel-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.c | 4 |
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; } |
