Re: [PATCH v2] cpufreq: amd-pstate: add check for cpufreq_cpu_get's return value

From: Viresh Kumar
Date: Tue Sep 03 2024 - 04:59:34 EST


On 26-08-24, 16:38, Anastasia Belova wrote:
> 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@xxxxxxxxxxxxx>
> ---
> v2: remove mixing code and declarations
> drivers/cpufreq/amd-pstate.c | 14 ++++++++++++--
> 1 file changed, 12 insertions(+), 2 deletions(-)

Applied. Thanks.

--
viresh