From: Viresh Kumar Date: Mon, 3 Aug 2015 03:06:20 +0000 (+0530) Subject: cpufreq: drop !cpufreq_driver check from cpufreq_parse_governor() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=36dfef23cd26a6d3b71dd86509e34d311f1cd906;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Rafael J. Wysocki --- 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, { 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; }