From patchwork Sun Feb 14 16:00:05 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roel Kluin X-Patchwork-Id: 79296 X-Patchwork-Delegate: paul@pwsan.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 o1EFrEO2022758 for ; Sun, 14 Feb 2010 15:53:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751701Ab0BNPwv (ORCPT ); Sun, 14 Feb 2010 10:52:51 -0500 Received: from mail-ew0-f228.google.com ([209.85.219.228]:61717 "EHLO mail-ew0-f228.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751664Ab0BNPwu (ORCPT ); Sun, 14 Feb 2010 10:52:50 -0500 Received: by ewy28 with SMTP id 28so3501051ewy.28 for ; Sun, 14 Feb 2010 07:52:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=H9VN/kVrLZlEbXmkMuJvKXoXJ0siuyzNaHOpPK9roGk=; b=nfa0/TMvYDQN7/4cC8Qj9EaBSZ9GIZ4U2jvzYMqSYZutYj1+oBfWB6uHRdp24FJ9fr zXXVsYvqB7e3uxGeB461QWNxBIt4Hu0z42E6bX5f7bsjsKOfP+mSN3kvARIaHPL9DSTK mLK/FmySNWXIPspqH1TRgoWw8UNh/1Ayke4M4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=eBxcyMyFNLUJVnlOw0r4+inMFvuo/gs+Bd4IiwTwcygjxPrjxgBhllMY3OWYJ9n2oQ LR5i2meI58jpTudMbv/yBQa/WDMxjrX6fNCis78GU51tOb8UuTxe0IMacc0WtWpJwgel sVc73fbzLpnZfuCUPiUHuSf00HrWw0AV7Gq9s= Received: by 10.213.8.6 with SMTP id f6mr1805283ebf.93.1266162768719; Sun, 14 Feb 2010 07:52:48 -0800 (PST) Received: from zoinx.mars (d133062.upc-d.chello.nl [213.46.133.62]) by mx.google.com with ESMTPS id 14sm3815487ewy.15.2010.02.14.07.52.47 (version=SSLv3 cipher=RC4-MD5); Sun, 14 Feb 2010 07:52:47 -0800 (PST) Message-ID: <4B781E05.9040502@gmail.com> Date: Sun, 14 Feb 2010 17:00:05 +0100 From: Roel Kluin User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) Gecko/20100120 Fedora/3.0.1-1.fc12 Thunderbird/3.0.1 MIME-Version: 1.0 To: paul@pwsan.com, Andrew Morton , linux-omap@vger.kernel.org, LKML Subject: [PATCH] OMAP: Dereference of NULL autodep in _autodep_lookup() 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]); Sun, 14 Feb 2010 15:53:14 +0000 (UTC) diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c index dd285f0..8f359c1 100644 --- a/arch/arm/mach-omap2/clockdomain.c +++ b/arch/arm/mach-omap2/clockdomain.c @@ -64,9 +64,6 @@ static void _autodep_lookup(struct clkdm_pwrdm_autodep *autodep) { struct powerdomain *pwrdm; - if (!autodep) - return; - if (!omap_chip_is(autodep->omap_chip)) return; @@ -211,7 +208,7 @@ void clkdm_init(struct clockdomain **clkdms, autodeps = init_autodeps; if (autodeps) - for (autodep = autodeps; autodep->pwrdm.ptr; autodep++) + for (autodep = autodeps; autodep; autodep++) _autodep_lookup(autodep); }