Commit cd9f7bf6 authored by Anastasia Belova's avatar Anastasia Belova Committed by Greg Kroah-Hartman
Browse files

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: default avatarAnastasia Belova <abelova@astralinux.ru>
Reviewed-by: default avatarPerry Yuan <perry.yuan@amd.com>
Signed-off-by: default avatarViresh 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: default avatarRajani Kantha <rajanikantha@engineer.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2364dc21
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment