cpufreq: merge 'if' blocks in __cpufreq_remove_dev_prepare()
authorViresh Kumar <viresh.kumar@linaro.org>
Fri, 2 Jan 2015 07:04:25 +0000 (12:34 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 23 Jan 2015 21:49:33 +0000 (22:49 +0100)
There are two 'if' blocks here, checking for !cpufreq_driver->setpolicy and
has_target(). Both are actually doing the same thing, merge them.

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 4c70f7a..626ef84 100644 (file)
@@ -1371,11 +1371,10 @@ static int __cpufreq_remove_dev_prepare(struct device *dev,
                        pr_err("%s: Failed to stop governor\n", __func__);
                        return ret;
                }
-       }
 
-       if (!cpufreq_driver->setpolicy)
                strncpy(per_cpu(cpufreq_cpu_governor, cpu),
                        policy->governor->name, CPUFREQ_NAME_LEN);
+       }
 
        down_read(&policy->rwsem);
        cpus = cpumask_weight(policy->cpus);