aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2020-08-27 10:54:15 +0530
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2020-08-27 12:51:25 +0200
commit681fe68448ef370f1d7213cab38013ab8e9d8ff0 (patch)
tree4ed85c956aaa6efc1368969ffce79b7a0c5a6a67 /drivers/cpufreq/cpufreq.c
parentDocumentation: fix pm/intel_pstate build warning and wording (diff)
downloadlinux-dev-681fe68448ef370f1d7213cab38013ab8e9d8ff0.tar.xz
linux-dev-681fe68448ef370f1d7213cab38013ab8e9d8ff0.zip
cpufreq: No need to verify cpufreq_driver in show_scaling_cur_freq()
"cpufreq_driver" is guaranteed to be valid here, no need to check it here. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to '')
-rw-r--r--drivers/cpufreq/cpufreq.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 02ab56b2a0d8..47aa90f9a7c2 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -703,8 +703,7 @@ static ssize_t show_scaling_cur_freq(struct cpufreq_policy *policy, char *buf)
freq = arch_freq_get_on_cpu(policy->cpu);
if (freq)
ret = sprintf(buf, "%u\n", freq);
- else if (cpufreq_driver && cpufreq_driver->setpolicy &&
- cpufreq_driver->get)
+ else if (cpufreq_driver->setpolicy && cpufreq_driver->get)
ret = sprintf(buf, "%u\n", cpufreq_driver->get(policy->cpu));
else
ret = sprintf(buf, "%u\n", policy->cur);