diff mbox

[5/5] drivers/gpu/drm/drm_memory.c: fix check for end of loop

Message ID 201004272111.o3RLB5Ax019964@imap1.linux-foundation.org (mailing list archive)
State New, archived
Headers show

Commit Message

Andrew Morton April 27, 2010, 9:11 p.m. UTC
None
diff mbox

Patch

diff -puN drivers/gpu/drm/drm_memory.c~drivers-gpu-drm-drm_memoryc-fix-check-for-end-of-loop drivers/gpu/drm/drm_memory.c
--- a/drivers/gpu/drm/drm_memory.c~drivers-gpu-drm-drm_memoryc-fix-check-for-end-of-loop
+++ a/drivers/gpu/drm/drm_memory.c
@@ -77,7 +77,7 @@  static void *agp_remap(unsigned long off
 		    && (agpmem->bound + (agpmem->pages << PAGE_SHIFT)) >=
 		    (offset + size))
 			break;
-	if (!agpmem)
+	if (&agpmem->head == &dev->agp->memory)
 		return NULL;
 
 	/*