From: Viresh Kumar Date: Fri, 2 Jan 2015 07:04:25 +0000 (+0530) Subject: cpufreq: merge 'if' blocks in __cpufreq_remove_dev_prepare() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=db5f299574267c50067b967f898633d4dec7ecc4;p=linux-beck.git cpufreq: merge 'if' blocks in __cpufreq_remove_dev_prepare() 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 Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 4c70f7aa9b1e..626ef841479a 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -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);