diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2013-06-28 18:15:13 +1000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-25 14:07:22 -0700 |
commit | b26eb91187fdfa37b304b30003f799899e6373c9 (patch) | |
tree | 46314fb0c012a01649fb5a831835b2f868d1959b /arch/powerpc | |
parent | 8f6c5b6c1264c6cec9b04848d0744aac0853d641 (diff) |
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')
-rw-r--r-- | arch/powerpc/perf/core-book3s.c | 9 |
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; /* |