summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/s3c2410-cpufreq.c
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2021-01-05 10:19:57 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-01-17 14:04:21 +0100
commit8b471834608d67a02c50b692e6bf24ff6cc6dd31 (patch)
tree009493b219bc202b764ac67c381ce73a0b12bd7b /drivers/cpufreq/s3c2410-cpufreq.c
parent1bf68c17797073b4fc1459b8584bf98f0b05d377 (diff)
downloadlinux-stable-8b471834608d67a02c50b692e6bf24ff6cc6dd31.tar.gz
linux-stable-8b471834608d67a02c50b692e6bf24ff6cc6dd31.tar.bz2
linux-stable-8b471834608d67a02c50b692e6bf24ff6cc6dd31.zip
cpufreq: powernow-k8: pass policy rather than use cpufreq_cpu_get()
commit 943bdd0cecad06da8392a33093230e30e501eccc upstream. 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 <viresh.kumar@linaro.org> Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/cpufreq/s3c2410-cpufreq.c')
0 files changed, 0 insertions, 0 deletions