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:Junjie Wu <junjiew@codeaurora.org> Signed-off-by:
franciscofranco <franciscofranco.1990@gmail.com> Original commit: https://github.com/XileForce/Vindicator-S6/commit/69588b0260aaa2b543a0c8030def91c6cc2fa8e9
Loading
Please register or sign in to comment