All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] drm: fix check for end of loop
@ 2010-03-28 11:25 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2010-03-28 11:25 UTC (permalink / raw)
  To: David Airlie
  Cc: Eric Anholt, Dave Airlie, dri-devel, linux-kernel,
	kernel-janitors

"agpmem" is never NULL here.

Signed-off-by: Dan Carpenter <error27@gmail.com>

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;
 
 	/*

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [patch] drm: fix check for end of loop
@ 2010-03-28 11:25 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2010-03-28 11:25 UTC (permalink / raw)
  To: David Airlie
  Cc: Eric Anholt, Dave Airlie, dri-devel, linux-kernel,
	kernel-janitors

"agpmem" is never NULL here.

Signed-off-by: Dan Carpenter <error27@gmail.com>

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;
 
 	/*

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-03-28 11:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-28 11:25 [patch] drm: fix check for end of loop Dan Carpenter
2010-03-28 11:25 ` Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.