Skip to content

Commit ed2e916

Browse files
Xiu JianfengMiriam-Rachel
authored andcommitted
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: 9f66a39 ("iwlwifi: mvm: rs: add ops for the new rate scaling in the FW") Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com> Link: https://patch.msgid.link/20221109035213.570-1-xiujianfeng@huawei.com Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
1 parent a2393f3 commit ed2e916

File tree

1 file changed

+3
-1
lines changed
  • drivers/net/wireless/intel/iwlwifi/mvm

1 file changed

+3
-1
lines changed

drivers/net/wireless/intel/iwlwifi/mvm/ops.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,10 @@ static int __init iwl_mvm_init(void)
6161
}
6262

6363
ret = iwl_opmode_register("iwlmvm", &iwl_mvm_ops);
64-
if (ret)
64+
if (ret) {
6565
pr_err("Unable to register MVM op_mode: %d\n", ret);
66+
iwl_mvm_rate_control_unregister();
67+
}
6668

6769
return ret;
6870
}

0 commit comments

Comments
 (0)