From patchwork Mon Aug 29 17:58:10 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 1109672 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7TI4gTi026145 for ; Mon, 29 Aug 2011 18:04:44 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754516Ab1H2R6E (ORCPT ); Mon, 29 Aug 2011 13:58:04 -0400 Received: from na3sys009aog118.obsmtp.com ([74.125.149.244]:60563 "EHLO na3sys009aog118.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754430Ab1H2R6D (ORCPT ); Mon, 29 Aug 2011 13:58:03 -0400 Received: from mail-yi0-f44.google.com ([209.85.218.44]) (using TLSv1) by na3sys009aob118.postini.com ([74.125.148.12]) with SMTP ID DSNKTlvTKIZV/aP9ryLBZhIe0L825Eq1dCIH@postini.com; Mon, 29 Aug 2011 10:58:00 PDT Received: by mail-yi0-f44.google.com with SMTP id 12so3358447yie.3 for ; Mon, 29 Aug 2011 10:58:00 -0700 (PDT) Received: by 10.42.19.74 with SMTP id a10mr5185064icb.166.1314640680145; Mon, 29 Aug 2011 10:58:00 -0700 (PDT) Received: from localhost.localdomain (c-24-19-7-36.hsd1.wa.comcast.net [24.19.7.36]) by mx.google.com with ESMTPS id b9sm2718294ibb.32.2011.08.29.10.57.58 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 29 Aug 2011 10:57:59 -0700 (PDT) From: Kevin Hilman To: linux-omap@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Subject: [PATCH 10/12] OMAP3+: VP: update_errorgain(): return error if VP Date: Mon, 29 Aug 2011 10:58:10 -0700 Message-Id: <1314640692-3386-11-git-send-email-khilman@ti.com> X-Mailer: git-send-email 1.7.6 In-Reply-To: <1314640692-3386-1-git-send-email-khilman@ti.com> References: <1314640692-3386-1-git-send-email-khilman@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.6 (demeter2.kernel.org [140.211.167.43]); Mon, 29 Aug 2011 18:04:44 +0000 (UTC) Add check for valid VP in omap_vp_update_errorgain() Signed-off-by: Kevin Hilman --- arch/arm/mach-omap2/vp.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/vp.c b/arch/arm/mach-omap2/vp.c index 3807620..29698ac 100644 --- a/arch/arm/mach-omap2/vp.c +++ b/arch/arm/mach-omap2/vp.c @@ -103,6 +103,9 @@ int omap_vp_update_errorgain(struct voltagedomain *voltdm, { struct omap_volt_data *volt_data; + if (!voltdm->vp) + return -EINVAL; + /* Get volt_data corresponding to target_volt */ volt_data = omap_voltage_get_voltdata(voltdm, target_volt); if (IS_ERR(volt_data))