cpufreq: drop !cpufreq_driver check from cpufreq_parse_governor()
authorViresh Kumar <viresh.kumar@linaro.org>
Mon, 3 Aug 2015 03:06:20 +0000 (08:36 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 1 Sep 2015 13:50:39 +0000 (15:50 +0200)
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>
drivers/cpufreq/cpufreq.c

index a80bd68bbd747be4e2216ef5d3f9587edb497901..a05cc75cc45d7db1300be04b4247cc5a62e18584 100644 (file)
@@ -520,9 +520,6 @@ static int cpufreq_parse_governor(char *str_governor, unsigned int *policy,
 {
        int err = -EINVAL;
 
-       if (!cpufreq_driver)
-               goto out;
-
        if (cpufreq_driver->setpolicy) {
                if (!strncasecmp(str_governor, "performance", CPUFREQ_NAME_LEN)) {
                        *policy = CPUFREQ_POLICY_PERFORMANCE;
@@ -557,7 +554,6 @@ static int cpufreq_parse_governor(char *str_governor, unsigned int *policy,
 
                mutex_unlock(&cpufreq_governor_mutex);
        }
-out:
        return err;
 }