Commit 592532a7 authored by Dennis Beier's avatar Dennis Beier Committed by Viresh Kumar
Browse files

cpufreq/longhaul: handle NULL policy in longhaul_exit



longhaul_exit() was calling cpufreq_cpu_get(0) without checking
for a NULL policy pointer. On some systems, this could lead to a
NULL dereference and a kernel warning or panic.

This patch adds a check using unlikely() and returns early if the
policy is NULL.

Bugzilla: #219962

Signed-off-by: default avatarDennis Beier <nanovim@gmail.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent 7bc00846
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment