Skip to content
Commit 484d3f15 authored by Henry Martin's avatar Henry Martin Committed by Viresh Kumar
Browse files

cpufreq: scmi: Fix null-ptr-deref in scmi_cpufreq_get_rate()



cpufreq_cpu_get_raw() can return NULL when the target CPU is not present
in the policy->cpus mask. scmi_cpufreq_get_rate() does not check for
this case, which results in a NULL pointer dereference.

Add NULL check after cpufreq_cpu_get_raw() to prevent this issue.

Fixes: 99d6bdf3 ("cpufreq: add support for CPU DVFS based on SCMI message protocol")
Signed-off-by: default avatarHenry Martin <bsdhenrymartin@gmail.com>
Acked-by: Sudeep Holla's avatarSudeep Holla <sudeep.holla@arm.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent 9992649f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment