summaryrefslogtreecommitdiff
path: root/arch/powerpc/perf
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2013-06-28 08:15:13 (GMT)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-07-01 01:50:00 (GMT)
commit0a48843d6c5114cfa4a9540ee4d6af87628cec01 (patch)
tree4b9e97aa1629dc7a3c039a1a13f9605acd39f8ec /arch/powerpc/perf
parent7a7a41f9d5b28ac3a916b057a7d3cd3f435ee9a6 (diff)
downloadlinux-0a48843d6c5114cfa4a9540ee4d6af87628cec01.tar.xz
powerpc/perf: Use existing out label in power_pmu_enable()
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>
Diffstat (limited to 'arch/powerpc/perf')
-rw-r--r--arch/powerpc/perf/core-book3s.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c
index 517a135..1bb26d5 100644
--- a/arch/powerpc/perf/core-book3s.c
+++ b/arch/powerpc/perf/core-book3s.c
@@ -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;
/*