diff options
author | Colin Ian King <[email protected]> | 2021-01-05 10:19:57 +0000 |
---|---|---|
committer | Rafael J. Wysocki <[email protected]> | 2021-01-07 17:37:33 +0100 |
commit | 943bdd0cecad06da8392a33093230e30e501eccc (patch) | |
tree | 6d186263321beadfc83d1ef041f08e74a6edb07c /scripts/gdb/linux/utils.py | |
parent | 17ffd35809c34b9564edb10727d02eb62958ba5c (diff) |
cpufreq: powernow-k8: pass policy rather than use cpufreq_cpu_get()
Currently there is an unlikely case where cpufreq_cpu_get() returns a
NULL policy and this will cause a NULL pointer dereference later on.
Fix this by passing the policy to transition_frequency_fidvid() from
the caller and hence eliminating the need for the cpufreq_cpu_get()
and cpufreq_cpu_put().
Thanks to Viresh Kumar for suggesting the fix.
Addresses-Coverity: ("Dereference null return")
Fixes: b43a7ffbf33b ("cpufreq: Notify all policy->cpus in cpufreq_notify_transition()")
Suggested-by: Viresh Kumar <[email protected]>
Signed-off-by: Colin Ian King <[email protected]>
Acked-by: Viresh Kumar <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions