From patchwork Sun Mar 28 11:25:22 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 88765 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2SCWjbp015578 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 28 Mar 2010 12:33:21 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NvreH-0004Vh-D6; Sun, 28 Mar 2010 12:31:25 +0000 Received: from sfi-mx-4.v28.ch3.sourceforge.com ([172.29.28.124] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1Nvqca-0001v5-Vg for dri-devel@lists.sourceforge.net; Sun, 28 Mar 2010 11:25:36 +0000 Received-SPF: pass (sfi-mx-4.v28.ch3.sourceforge.com: domain of gmail.com designates 209.85.218.218 as permitted sender) client-ip=209.85.218.218; envelope-from=error27@gmail.com; helo=mail-bw0-f218.google.com; Received: from mail-bw0-f218.google.com ([209.85.218.218]) by sfi-mx-4.v28.ch3.sourceforge.com with esmtp (Exim 4.69) id 1Nvqca-0005Vl-0j for dri-devel@lists.sourceforge.net; Sun, 28 Mar 2010 11:25:36 +0000 Received: by bwz10 with SMTP id 10so12803738bwz.2 for ; Sun, 28 Mar 2010 04:25:30 -0700 (PDT) Received: by 10.204.48.197 with SMTP id s5mr4554239bkf.177.1269775530074; Sun, 28 Mar 2010 04:25:30 -0700 (PDT) Received: from bicker ([196.43.68.224]) by mx.google.com with ESMTPS id x16sm27169712bku.17.2010.03.28.04.25.27 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 28 Mar 2010 04:25:29 -0700 (PDT) Date: Sun, 28 Mar 2010 14:25:22 +0300 From: Dan Carpenter To: David Airlie Subject: [patch] drm: fix check for end of loop Message-ID: <20100328112522.GL5069@bicker> Mail-Followup-To: Dan Carpenter , David Airlie , Eric Anholt , Dave Airlie , dri-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-Spam-Score: 2.0 (++) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 2.2 RCVD_IN_BL_SPAMCOP_NET RBL: Received via a relay in bl.spamcop.net [Blocked - see ] 1.5 RCVD_IN_PSBL RBL: Received via a relay in PSBL [196.43.68.224 listed in psbl.surriel.com] -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record -0.0 DKIM_VERIFIED Domain Keys Identified Mail: signature passes verification 0.0 DKIM_SIGNED Domain Keys Identified Mail: message has a signature 1.5 SF_NO_SPF_SPAM SF_NO_SPF_SPAM -1.7 AWL AWL: From: address is in the auto white-list X-Headers-End: 1Nvqca-0005Vl-0j X-Mailman-Approved-At: Sun, 28 Mar 2010 12:31:23 +0000 Cc: dri-devel@lists.sourceforge.net, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, Dave Airlie X-BeenThere: dri-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.sourceforge.net X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sun, 28 Mar 2010 12:33:22 +0000 (UTC) diff --git a/drivers/gpu/drm/drm_memory.c b/drivers/gpu/drm/drm_memory.c index e4865f9..7732268 100644 --- a/drivers/gpu/drm/drm_memory.c +++ b/drivers/gpu/drm/drm_memory.c @@ -77,7 +77,7 @@ static void *agp_remap(unsigned long offset, unsigned long size, && (agpmem->bound + (agpmem->pages << PAGE_SHIFT)) >= (offset + size)) break; - if (!agpmem) + if (&agpmem->head == &dev->agp->memory) return NULL; /*