From patchwork Tue Aug 11 02:00:52 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Chan X-Patchwork-Id: 40547 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7B213Ub015286 for ; Tue, 11 Aug 2009 02:01:03 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750798AbZHKCA7 (ORCPT ); Mon, 10 Aug 2009 22:00:59 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750882AbZHKCA7 (ORCPT ); Mon, 10 Aug 2009 22:00:59 -0400 Received: from smtp-out.google.com ([216.239.33.17]:28558 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750798AbZHKCA6 (ORCPT ); Mon, 10 Aug 2009 22:00:58 -0400 Received: from zps37.corp.google.com (zps37.corp.google.com [172.25.146.37]) by smtp-out.google.com with ESMTP id n7B20uqX002111; Tue, 11 Aug 2009 03:00:57 +0100 Received: from localhost (cheetara.mtv.corp.google.com [172.18.103.81]) by zps37.corp.google.com with ESMTP id n7B20qRX001983; Mon, 10 Aug 2009 19:00:54 -0700 Received: by localhost (Postfix, from userid 18922) id D5A4F5047AB; Mon, 10 Aug 2009 19:00:52 -0700 (PDT) From: Mike Chan To: linux-omap@vger.kernel.org Cc: khilman@deeprootsystems.com, Mike Chan Subject: [PATCH] omap: pm: Fix overflow when doing powerdomain deps lookups. Date: Mon, 10 Aug 2009 19:00:52 -0700 Message-Id: <1249956052-21893-1-git-send-email-mike@android.com> X-Mailer: git-send-email 1.5.4.5 X-System-Of-Record: true Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Signed-off-by: Mike Chan --- arch/arm/mach-omap2/powerdomain.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index 0334609..6077629 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c @@ -90,7 +90,7 @@ static struct powerdomain *_pwrdm_deps_lookup(struct powerdomain *pwrdm, if (!pwrdm || !deps || !omap_chip_is(pwrdm->omap_chip)) return ERR_PTR(-EINVAL); - for (pd = deps; pd; pd++) { + for (pd = deps; pd->pwrdm_name; pd++) { if (!omap_chip_is(pd->omap_chip)) continue;