]> err.no Git - linux-2.6/commitdiff
Here are two possible cleanups in cpufreq.c:
authorDave Jones <davej@redhat.com>
Thu, 28 Jul 2005 16:43:56 +0000 (09:43 -0700)
committerDave Jones <davej@redhat.com>
Thu, 28 Jul 2005 16:43:56 +0000 (09:43 -0700)
* ret has no need to be unsigned in cpufreq_driver_target()
* ret has no need to be initialized in __cpufreq_governor()

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Dave Jones <davej@redhat.com>
drivers/cpufreq/cpufreq.c

index 7a7859dd0d9859869f0e851aef8ebf8017a16a89..10b0149823816b60dc4807a95f072142e1df3f42 100644 (file)
@@ -1130,7 +1130,7 @@ int cpufreq_driver_target(struct cpufreq_policy *policy,
                          unsigned int target_freq,
                          unsigned int relation)
 {
-       unsigned int ret;
+       int ret;
 
        policy = cpufreq_cpu_get(policy->cpu);
        if (!policy)
@@ -1151,7 +1151,7 @@ EXPORT_SYMBOL_GPL(cpufreq_driver_target);
 
 static int __cpufreq_governor(struct cpufreq_policy *policy, unsigned int event)
 {
-       int ret = -EINVAL;
+       int ret;
 
        if (!try_module_get(policy->governor->owner))
                return -EINVAL;