summaryrefslogtreecommitdiff
path: root/arch/powerpc/perf
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2013-06-28 12:15:13 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-26 01:07:22 +0400
commitb26eb91187fdfa37b304b30003f799899e6373c9 (patch)
tree46314fb0c012a01649fb5a831835b2f868d1959b /arch/powerpc/perf
parent8f6c5b6c1264c6cec9b04848d0744aac0853d641 (diff)
downloadlinux-b26eb91187fdfa37b304b30003f799899e6373c9.tar.xz
powerpc/perf: Use existing out label in power_pmu_enable()
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>
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 3d566ee896e2..af4b4b1a691f 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;
/*