diff options
author | 2020-08-27 10:54:15 +0530 | |
---|---|---|
committer | 2020-08-27 12:51:25 +0200 | |
commit | 681fe68448ef370f1d7213cab38013ab8e9d8ff0 (patch) | |
tree | 4ed85c956aaa6efc1368969ffce79b7a0c5a6a67 | |
parent | Documentation: fix pm/intel_pstate build warning and wording (diff) | |
download | linux-681fe68448ef370f1d7213cab38013ab8e9d8ff0.tar.gz linux-681fe68448ef370f1d7213cab38013ab8e9d8ff0.tar.bz2 linux-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>
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 3 |
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); |