aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2015-08-02 23:06:20 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-09-01 09:50:39 -0400
commit36dfef23cd26a6d3b71dd86509e34d311f1cd906 (patch)
treef8637b71247965c6f422ac1c286ddb762f7ffabe
parentc7a7b418dd1991079dd7ef03fec7d1863ef96154 (diff)
cpufreq: drop !cpufreq_driver check from cpufreq_parse_governor()
Driver is guaranteed to be present on a call to cpufreq_parse_governor() and there is no need to check for !cpufreq_driver. Drop it. 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.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index a80bd68bbd74..a05cc75cc45d 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -520,9 +520,6 @@ static int cpufreq_parse_governor(char *str_governor, unsigned int *policy,
520{ 520{
521 int err = -EINVAL; 521 int err = -EINVAL;
522 522
523 if (!cpufreq_driver)
524 goto out;
525
526 if (cpufreq_driver->setpolicy) { 523 if (cpufreq_driver->setpolicy) {
527 if (!strncasecmp(str_governor, "performance", CPUFREQ_NAME_LEN)) { 524 if (!strncasecmp(str_governor, "performance", CPUFREQ_NAME_LEN)) {
528 *policy = CPUFREQ_POLICY_PERFORMANCE; 525 *policy = CPUFREQ_POLICY_PERFORMANCE;
@@ -557,7 +554,6 @@ static int cpufreq_parse_governor(char *str_governor, unsigned int *policy,
557 554
558 mutex_unlock(&cpufreq_governor_mutex); 555 mutex_unlock(&cpufreq_governor_mutex);
559 } 556 }
560out:
561 return err; 557 return err;
562} 558}
563 559