Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 35a2dab6 authored by Junjie Wu's avatar Junjie Wu
Browse files

cpufreq: Return directly in __cpufreq_get if policy is NULL



__cpufreq_get() checks whether policy->cur matches frequency returned
by cpufreq device driver and acts accordingly. However, policy could
be NULL if the CPU is being hotplugged. Current implementation crashes
when trying to dereference the NULL policy.

Return the frequency provided by cpufreq device driver directly if
policy is not available.

Change-Id: I1f2ba4028c259392bf730db37dbec2d8c5ae3fa4
Signed-off-by: default avatarJunjie Wu <junjiew@codeaurora.org>
parent 59973f39
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment