powerpc/perf: Use existing out label in power_pmu_enable()
authorMichael Ellerman <michael@ellerman.id.au>
Fri, 28 Jun 2013 08:15:13 +0000 (18:15 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 1 Jul 2013 01:50:00 +0000 (11:50 +1000)
In power_pmu_enable() we can use the existing out label to reduce the
number of return paths.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
CC: <stable@vger.kernel.org> [v3.10]
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/perf/core-book3s.c

index 517a1350b09c93356a468cbc3d3014cc3a137fdf..1bb26d586e3c7a3e55d9dcd07cfa6d051e9b7984 100644 (file)
@@ -919,12 +919,13 @@ static void power_pmu_enable(struct pmu *pmu)
 
        if (!ppmu)
                return;
+
        local_irq_save(flags);
+
        cpuhw = &__get_cpu_var(cpu_hw_events);
-       if (!cpuhw->disabled) {
-               local_irq_restore(flags);
-               return;
-       }
+       if (!cpuhw->disabled)
+               goto out;
+
        cpuhw->disabled = 0;
 
        /*