From patchwork Tue Dec 15 13:31:12 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: abhijitpagare@ti.com X-Patchwork-Id: 67619 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nBFDVUIS028472 for ; Tue, 15 Dec 2009 13:31:31 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760161AbZLONba (ORCPT ); Tue, 15 Dec 2009 08:31:30 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760159AbZLONb3 (ORCPT ); Tue, 15 Dec 2009 08:31:29 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:42582 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760158AbZLONb2 (ORCPT ); Tue, 15 Dec 2009 08:31:28 -0500 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id nBFDVH8F027138 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 15 Dec 2009 07:31:20 -0600 Received: from linfarm476.india.ti.com (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id nBFDVDaP005519; Tue, 15 Dec 2009 19:01:14 +0530 (IST) Received: from linfarm476.india.ti.com (localhost [127.0.0.1]) by linfarm476.india.ti.com (8.12.11/8.12.11) with ESMTP id nBFDVDD7022421; Tue, 15 Dec 2009 19:01:13 +0530 Received: (from a0393848@localhost) by linfarm476.india.ti.com (8.12.11/8.12.11/Submit) id nBFDVCxK022416; Tue, 15 Dec 2009 19:01:12 +0530 From: Abhijit Pagare To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Abhijit Pagare , Paul Walmsley , Benoit Cousson , Rajendra Nayak Subject: [PATCH 1/1] ARM: OMAP3: PM: Fix the Invalid CM_CLKSTCTRL reg access. Date: Tue, 15 Dec 2009 19:01:12 +0530 Message-Id: <1260883872-22299-1-git-send-email-abhijitpagare@ti.com> X-Mailer: git-send-email 1.5.5 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c index 1a45ed1..dd285f0 100644 --- a/arch/arm/mach-omap2/clockdomain.c +++ b/arch/arm/mach-omap2/clockdomain.c @@ -559,7 +559,7 @@ int omap2_clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk) * downstream clocks for debugging purposes? */ - if (!clkdm || !clk) + if (!clkdm || !clk || !clkdm->clktrctrl_mask) return -EINVAL; if (atomic_inc_return(&clkdm->usecount) > 1) @@ -610,7 +610,7 @@ int omap2_clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk) * downstream clocks for debugging purposes? */ - if (!clkdm || !clk) + if (!clkdm || !clk || !clkdm->clktrctrl_mask) return -EINVAL; #ifdef DEBUG