summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-07-28 00:11:30 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-07-28 18:24:11 +0300
commitd4d854d6c7706e6a5cda297e350e3626d55e9bc9 (patch)
treec4ab275a7855461facee421fcb7aeb0d42c64083 /drivers
parent11ce707e6c2aea05e1f54680fb89a8a44ded5db4 (diff)
downloadlinux-d4d854d6c7706e6a5cda297e350e3626d55e9bc9.tar.xz
cpufreq: Drop unnecessary label from cpufreq_add_dev()
The leftover out_release_rwsem label in cpufreq_add_dev() is not necessary any more and confusing, so drop it. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/cpufreq/cpufreq.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 3199b8dafd60..5c80502339a1 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1201,7 +1201,7 @@ static void cpufreq_policy_free(struct cpufreq_policy *policy, bool notify)
static int cpufreq_add_dev(struct device *dev, struct subsys_interface *sif)
{
unsigned int j, cpu = dev->id;
- int ret = -ENOMEM;
+ int ret;
struct cpufreq_policy *policy;
unsigned long flags;
bool recover_policy;
@@ -1237,7 +1237,7 @@ static int cpufreq_add_dev(struct device *dev, struct subsys_interface *sif)
recover_policy = false;
policy = cpufreq_policy_alloc(dev);
if (!policy)
- goto out_release_rwsem;
+ return -ENOMEM;
}
cpumask_copy(policy->cpus, cpumask_of(cpu));
@@ -1372,7 +1372,6 @@ out_exit_policy:
cpufreq_driver->exit(policy);
out_free_policy:
cpufreq_policy_free(policy, recover_policy);
-out_release_rwsem:
return ret;
}