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

Skip to content
Commit e8c6155a authored by Junjie Wu's avatar Junjie Wu Committed by alexax66
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>
Signed-off-by: default avatarfranciscofranco <franciscofranco.1990@gmail.com>

Original commit: https://github.com/XileForce/Vindicator-S6/commit/69588b0260aaa2b543a0c8030def91c6cc2fa8e9
parent 522475ae
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