From patchwork Tue Jul 13 05:47:04 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thara Gopinath X-Patchwork-Id: 111667 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6D5lTqR014115 for ; Tue, 13 Jul 2010 05:47:29 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752135Ab0GMFrX (ORCPT ); Tue, 13 Jul 2010 01:47:23 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:54705 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751555Ab0GMFrV (ORCPT ); Tue, 13 Jul 2010 01:47:21 -0400 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id o6D5lF69008491 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 13 Jul 2010 00:47:17 -0500 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 o6D5l87L013696; Tue, 13 Jul 2010 11:17:08 +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 o6D5l8Ib024132; Tue, 13 Jul 2010 11:17:08 +0530 Received: (from a0393109@localhost) by linfarm476.india.ti.com (8.12.11/8.12.11/Submit) id o6D5l84f024130; Tue, 13 Jul 2010 11:17:08 +0530 From: Thara Gopinath To: linux-omap@vger.kernel.org Cc: khilman@deeprootsystems.com, paul@pwsan.com, tony@atomide.com, b-cousson@ti.com, sawant@ti.com, vishwanath.bs@ti.com, premi@ti.com, Thara Gopinath Subject: [PM-OPP][PATCH 2/4] OMAP: Correct the return value check after call into find_device_opp Date: Tue, 13 Jul 2010 11:17:04 +0530 Message-Id: <1279000026-24042-3-git-send-email-thara@ti.com> X-Mailer: git-send-email 1.5.6.6 In-Reply-To: <1279000026-24042-2-git-send-email-thara@ti.com> References: <1279000026-24042-1-git-send-email-thara@ti.com> <1279000026-24042-2-git-send-email-thara@ti.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 13 Jul 2010 05:47:30 +0000 (UTC) diff --git a/arch/arm/plat-omap/opp.c b/arch/arm/plat-omap/opp.c index a06b88d..d88a2e0 100644 --- a/arch/arm/plat-omap/opp.c +++ b/arch/arm/plat-omap/opp.c @@ -457,8 +457,10 @@ void opp_init_cpufreq_table(struct device *dev, int i = 0; dev_opp = find_device_opp(dev); - if (WARN_ON(!dev_opp)) + if (IS_ERR(dev_opp)) { + WARN_ON(1); return; + } freq_table = kzalloc(sizeof(struct cpufreq_frequency_table) * (dev_opp->enabled_opp_count + 1), GFP_ATOMIC);