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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jul 2013 21:07:22 +0000 (14:07 -0700)
commit 0a48843d6c5114cfa4a9540ee4d6af87628cec01 upstream.

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>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/perf/core-book3s.c

index 3d566ee..af4b4b1 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;
 
        /*