[ltt-dev] [PATCH] arm-trace-clock-fix-release-pmu

Avik Sil avik.sil at linaro.org
Tue Mar 29 13:38:52 EDT 2011


ARM trace clock fix release_pmu

Check if reserved_pmu is valid before passing it to release_pmu()

Signed-off-by: Avik Sil <avik.sil at linaro.org>
---
 arch/arm/mach-omap2/trace-clock.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/trace-clock.c b/arch/arm/mach-omap2/trace-clock.c
index 3db1cdb..c21bd47 100644
--- a/arch/arm/mach-omap2/trace-clock.c
+++ b/arch/arm/mach-omap2/trace-clock.c
@@ -565,7 +565,8 @@ void put_trace_clock(void)
 	if (trace_clock_refcount != 1)
 		goto end;
 	_stop_trace_clock();
-	release_pmu(reserved_pmu);
+	if (!IS_ERR_OR_NULL(reserved_pmu))
+		release_pmu(reserved_pmu);
 end:
 	trace_clock_refcount--;
 	spin_unlock(&trace_clock_lock);
-- 
1.7.0.4





More information about the lttng-dev mailing list