mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 19:13:47 +02:00
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: 9f66a397c8 ("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>
This commit is contained in:
parent
a2393f3a69
commit
ed2e916c89
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user