diff options
| author | Jinjie Ruan <[email protected]> | 2024-11-07 11:38:41 +0000 |
|---|---|---|
| committer | Viresh Kumar <[email protected]> | 2024-11-11 04:15:17 +0000 |
| commit | 172bf5ed04cb6c9e66d58de003938ed5c8756570 (patch) | |
| tree | 6cc0d6fc94de91e7e016284e10c992afbe1a7981 /drivers/cpufreq/cppc_cpufreq.c | |
| parent | cpufreq: CPPC: Fix wrong return value in cppc_get_cpu_power() (diff) | |
| download | kernel-172bf5ed04cb6c9e66d58de003938ed5c8756570.tar.gz kernel-172bf5ed04cb6c9e66d58de003938ed5c8756570.zip | |
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: [email protected]
Fixes: 4855e26bcf4d ("cpufreq: mediatek-hw: Add support for CPUFREQ HW")
Reviewed-by: Lukasz Luba <[email protected]>
Suggested-by: Lukasz Luba <[email protected]>
Signed-off-by: Jinjie Ruan <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
Diffstat (limited to 'drivers/cpufreq/cppc_cpufreq.c')
0 files changed, 0 insertions, 0 deletions
