mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 17:41:50 +00:00
cpufreq: qcom-hw: Fix memory leak in qcom_cpufreq_hw_read_lut()
[ Upstream commit9901c21bca
] If "cpu_dev" fails to get opp table in qcom_cpufreq_hw_read_lut(), the program will return, resulting in "table" resource is not released. Fixes:51c843cf77
("cpufreq: qcom: Update the bandwidth levels on frequency change") Signed-off-by: Chen Hui <judy.chenhui@huawei.com> Reviewed-by: Sibi Sankar <quic_sibis@quicinc.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
0df110fc71
commit
3b62d3b511
1 changed files with 1 additions and 0 deletions
|
@ -177,6 +177,7 @@ static int qcom_cpufreq_hw_read_lut(struct device *cpu_dev,
|
|||
}
|
||||
} else if (ret != -ENODEV) {
|
||||
dev_err(cpu_dev, "Invalid opp table in device tree\n");
|
||||
kfree(table);
|
||||
return ret;
|
||||
} else {
|
||||
policy->fast_switch_possible = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue