summaryrefslogtreecommitdiff
path: root/security/security.c
diff options
context:
space:
mode:
authorJinjie Ruan <ruanjinjie@huawei.com>2024-11-07 19:38:41 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-12-14 19:54:02 +0100
commitc923c437ed69d44ee3753f9cf47d48d2a53d26f7 (patch)
treede0cad02de9387481944c63b1cf466d792e6f1ac /security/security.c
parent1050f5871588b469af8b1c8a4495ab867b1454e2 (diff)
downloadlinux-c923c437ed69d44ee3753f9cf47d48d2a53d26f7.tar.gz
linux-c923c437ed69d44ee3753f9cf47d48d2a53d26f7.tar.bz2
linux-c923c437ed69d44ee3753f9cf47d48d2a53d26f7.zip
cpufreq: mediatek-hw: Fix wrong return value in mtk_cpufreq_get_cpu_power()
commit 172bf5ed04cb6c9e66d58de003938ed5c8756570 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'security/security.c')
0 files changed, 0 insertions, 0 deletions