diff options
author | Yue Hu <huyue2@yulong.com> | 2019-04-16 10:40:27 +0800 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-04-16 23:10:42 +0200 |
commit | b23aa311fa1f376640069e5da897b4a6148d104f (patch) | |
tree | 87793c4e30036be8d3adf74c8bc3c60e3875d661 /drivers | |
parent | eae2ef0ed2460c56915b13e7d67bb46ae379ec72 (diff) | |
download | linux-b23aa311fa1f376640069e5da897b4a6148d104f.tar.bz2 |
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>
Diffstat (limited to 'drivers')
-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) { unsigned int limit; int ret; - if (cpufreq_driver->bios_limit) { - ret = cpufreq_driver->bios_limit(policy->cpu, &limit); - if (!ret) - return sprintf(buf, "%u\n", limit); - } + ret = cpufreq_driver->bios_limit(policy->cpu, &limit); + if (!ret) + return sprintf(buf, "%u\n", limit); return sprintf(buf, "%u\n", policy->cpuinfo.max_freq); } |