cpufreq: acpi-cpufreq: Drop pointless label from acpi_cpufreq_target()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 25 Feb 2016 23:03:58 +0000 (00:03 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 26 Feb 2016 21:11:55 +0000 (22:11 +0100)
The "out" label at the final return statement in acpi_cpufreq_target()
is totally pointless, so drop them and modify the code to return the
right values immediately instead of jumping to it.

No functional changes.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/acpi-cpufreq.c

index 51eef87bbc374f85826b16b27141f024aefd9bbe..17a8d0c58abba21b44904cc8e689fe13a459a088 100644 (file)
@@ -434,7 +434,7 @@ static int acpi_cpufreq_target(struct cpufreq_policy *policy,
                } else {
                        pr_debug("Already at target state (P%d)\n",
                                next_perf_state);
-                       goto out;
+                       return 0;
                }
        }
 
@@ -456,8 +456,7 @@ static int acpi_cpufreq_target(struct cpufreq_policy *policy,
                cmd.val = (u32) perf->states[next_perf_state].control;
                break;
        default:
-               result = -ENODEV;
-               goto out;
+               return -ENODEV;
        }
 
        /* cpufreq holds the hotplug lock, so we are safe from here on */
@@ -480,7 +479,6 @@ static int acpi_cpufreq_target(struct cpufreq_policy *policy,
        if (!result)
                perf->state = next_perf_state;
 
-out:
        return result;
 }