Commit b23aa311 authored by Yue Hu's avatar Yue Hu Committed by Rafael J. Wysocki

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: default avatarYue Hu <huyue2@yulong.com>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent eae2ef0e
...@@ -894,11 +894,9 @@ static ssize_t show_bios_limit(struct cpufreq_policy *policy, char *buf) ...@@ -894,11 +894,9 @@ static ssize_t show_bios_limit(struct cpufreq_policy *policy, char *buf)
{ {
unsigned int limit; unsigned int limit;
int ret; int ret;
if (cpufreq_driver->bios_limit) {
ret = cpufreq_driver->bios_limit(policy->cpu, &limit); ret = cpufreq_driver->bios_limit(policy->cpu, &limit);
if (!ret) if (!ret)
return sprintf(buf, "%u\n", limit); return sprintf(buf, "%u\n", limit);
}
return sprintf(buf, "%u\n", policy->cpuinfo.max_freq); return sprintf(buf, "%u\n", policy->cpuinfo.max_freq);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment