From patchwork Tue Feb 16 08:27:16 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 79539 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o1G8RPvw024111 for ; Tue, 16 Feb 2010 08:27:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754972Ab0BPI1Z (ORCPT ); Tue, 16 Feb 2010 03:27:25 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:40682 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751246Ab0BPI1Y (ORCPT ); Tue, 16 Feb 2010 03:27:24 -0500 Received: from dlep34.itg.ti.com ([157.170.170.115]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id o1G8RMSV029488 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 16 Feb 2010 02:27:22 -0600 Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep34.itg.ti.com (8.13.7/8.13.7) with ESMTP id o1G8RJpq023245; Tue, 16 Feb 2010 02:27:19 -0600 (CST) Received: from senorita (senorita.am.dhcp.ti.com [128.247.75.1]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id o1G8RJZ04672; Tue, 16 Feb 2010 02:27:19 -0600 (CST) Received: by senorita (Postfix, from userid 1000) id 19932C214; Tue, 16 Feb 2010 02:27:18 -0600 (CST) From: Nishanth Menon To: Linux-OMAP Cc: Nishanth Menon , Ambresh K , Eduardo Valentin , Kevin Hilman Subject: [PM-WIP-OPP] [PATCH 1/2] omap3:pm:srf: check if pointer results with IS_ERR Date: Tue, 16 Feb 2010 02:27:16 -0600 Message-Id: <1266308837-23262-2-git-send-email-nm@ti.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1266308837-23262-1-git-send-email-nm@ti.com> References: <1266308837-23262-1-git-send-email-nm@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, 16 Feb 2010 08:27:26 +0000 (UTC) diff --git a/arch/arm/mach-omap2/resource34xx.c b/arch/arm/mach-omap2/resource34xx.c index 3604a38..ecc3c68 100644 --- a/arch/arm/mach-omap2/resource34xx.c +++ b/arch/arm/mach-omap2/resource34xx.c @@ -177,7 +177,7 @@ static int __deprecated opp_to_freq(unsigned long *freq, enum opp_t opp_type, BUG_ON(!freq || opp_type >= OPP_TYPES_MAX); opp = opp_find_by_opp_id(opp_type, opp_id); - if (!opp) + if (IS_ERR(opp)) return -EINVAL; *freq = opp_get_freq(opp);