cpufreq: amd-pstate: add check for cpufreq_cpu_get's return value
commit 5493f971 upstream. cpufreq_cpu_get may return NULL. To avoid NULL-dereference check it and return in case of error. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by:Anastasia Belova <abelova@astralinux.ru> Reviewed-by:
Perry Yuan <perry.yuan@amd.com> Signed-off-by:
Viresh Kumar <viresh.kumar@linaro.org> [ Raj: on 6.6, there don't have function amd_pstate_update_limits() so applied the NULL checking in amd_pstate_adjust_perf() only ] Signed-off-by:
Rajani Kantha <rajanikantha@engineer.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Loading
Please sign in to comment