From patchwork Tue Mar 29 17:38:52 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avik Sil X-Patchwork-Id: 830 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:46:13 -0000 Delivered-To: patches@linaro.org Received: by 10.236.111.49 with SMTP id v37cs60610yhg; Tue, 29 Mar 2011 10:39:09 -0700 (PDT) Received: by 10.231.65.75 with SMTP id h11mr58024ibi.149.1301420347806; Tue, 29 Mar 2011 10:39:07 -0700 (PDT) Received: from mail-iy0-f178.google.com (mail-iy0-f178.google.com [209.85.210.178]) by mx.google.com with ESMTPS id hj39si14377426ibb.61.2011.03.29.10.39.06 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 29 Mar 2011 10:39:06 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.210.178 is neither permitted nor denied by best guess record for domain of avik.sil@linaro.org) client-ip=209.85.210.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.178 is neither permitted nor denied by best guess record for domain of avik.sil@linaro.org) smtp.mail=avik.sil@linaro.org Received: by iyi12 with SMTP id 12so442229iyi.37 for ; Tue, 29 Mar 2011 10:39:06 -0700 (PDT) Received: by 10.231.192.197 with SMTP id dr5mr147727ibb.2.1301420345981; Tue, 29 Mar 2011 10:39:05 -0700 (PDT) Received: from localhost.localdomain ([117.192.68.210]) by mx.google.com with ESMTPS id y10sm3787795iba.63.2011.03.29.10.39.02 (version=SSLv3 cipher=OTHER); Tue, 29 Mar 2011 10:39:05 -0700 (PDT) From: Avik Sil To: mathieu.desnoyers@efficios.com Cc: ltt-dev@lists.casi.polymtl.ca, patches@linaro.org Subject: [ltt-dev][PATCH] arm-trace-clock-fix-release-pmu Date: Tue, 29 Mar 2011 23:08:52 +0530 Message-Id: <1301420332-17224-1-git-send-email-avik.sil@linaro.org> X-Mailer: git-send-email 1.7.0.4 ARM trace clock fix release_pmu Check if reserved_pmu is valid before passing it to release_pmu() Signed-off-by: Avik Sil --- 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);