diff options
| author | Yue Hu <huyue2@yulong.com> | 2019-04-15 22:40:27 -0400 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-04-16 17:10:42 -0400 |
| commit | b23aa311fa1f376640069e5da897b4a6148d104f (patch) | |
| tree | 87793c4e30036be8d3adf74c8bc3c60e3875d661 | |
| parent | eae2ef0ed2460c56915b13e7d67bb46ae379ec72 (diff) | |
cpufreq: Remove needless bios_limit check in show_bios_limit()
Initially, bios_limit attribute will be created if driver->bios_limit
is set in cpufreq_add_dev_interface(). So remove the redundant check
for latter show operation.
Signed-off-by: Yue Hu <huyue2@yulong.com>
Acked-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 | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 3f235d5f67ee..df7d112fe621 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
| @@ -894,11 +894,9 @@ static ssize_t show_bios_limit(struct cpufreq_policy *policy, char *buf) | |||
| 894 | { | 894 | { |
| 895 | unsigned int limit; | 895 | unsigned int limit; |
| 896 | int ret; | 896 | int ret; |
| 897 | if (cpufreq_driver->bios_limit) { | 897 | ret = cpufreq_driver->bios_limit(policy->cpu, &limit); |
| 898 | ret = cpufreq_driver->bios_limit(policy->cpu, &limit); | 898 | if (!ret) |
| 899 | if (!ret) | 899 | return sprintf(buf, "%u\n", limit); |
| 900 | return sprintf(buf, "%u\n", limit); | ||
| 901 | } | ||
| 902 | return sprintf(buf, "%u\n", policy->cpuinfo.max_freq); | 900 | return sprintf(buf, "%u\n", policy->cpuinfo.max_freq); |
| 903 | } | 901 | } |
| 904 | 902 | ||
