]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cpufreq: amd-pstate: add check for cpufreq_cpu_get's return value
authorAnastasia Belova <abelova@astralinux.ru>
Mon, 26 Aug 2024 13:38:41 +0000 (16:38 +0300)
committerViresh Kumar <viresh.kumar@linaro.org>
Wed, 4 Sep 2024 15:13:59 +0000 (20:43 +0530)
commit5493f9714e4cdaf0ee7cec15899a231400cb1a9f
tree8e9afc014bcbbf61c25be301836a5ea2ca0b213d
parentb14ceb82c3a1b6f1422af4ea7a2a686dbaf0a094
cpufreq: amd-pstate: add check for cpufreq_cpu_get's return value

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>
drivers/cpufreq/amd-pstate.c