From: Michael Ellerman Date: Fri, 28 Jun 2013 08:15:13 +0000 (+1000) Subject: powerpc/perf: Use existing out label in power_pmu_enable() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b26eb91187fdfa37b304b30003f799899e6373c9;p=karo-tx-linux.git 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 Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Greg Kroah-Hartman --- 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; /*