diff options
author | Jinjie Ruan <ruanjinjie@huawei.com> | 2024-11-07 14:38:41 +0300 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2024-11-11 07:15:17 +0300 |
commit | 172bf5ed04cb6c9e66d58de003938ed5c8756570 (patch) | |
tree | 6cc0d6fc94de91e7e016284e10c992afbe1a7981 /tools/perf/scripts/python/task-analyzer.py | |
parent | b51eb0874d8170028434fbd259e80b78ed9b8eca (diff) | |
download | linux-172bf5ed04cb6c9e66d58de003938ed5c8756570.tar.xz |
cpufreq: mediatek-hw: Fix wrong return value in mtk_cpufreq_get_cpu_power()
mtk_cpufreq_get_cpu_power() return 0 if the policy is NULL. Then in
em_create_perf_table(), the later zero check for power is not invalid
as power is uninitialized. As Lukasz suggested, it must return -EINVAL when
the 'policy' is not found. So return -EINVAL to fix it.
Cc: stable@vger.kernel.org
Fixes: 4855e26bcf4d ("cpufreq: mediatek-hw: Add support for CPUFREQ HW")
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Suggested-by: Lukasz Luba <lukasz.luba@arm.com>
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions