drivers/gpu/drm/drm_memory.c: fix check for end of loop
authorDan Carpenter <error27@gmail.com>
Tue, 27 Apr 2010 21:11:05 +0000 (14:11 -0700)
committerDave Airlie <airlied@redhat.com>
Wed, 28 Apr 2010 08:41:51 +0000 (18:41 +1000)
"agpmem" is never NULL here.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_memory.c

index e4865f99989c717faf84c6d5488d788c87cee4ed..7732268eced2564d37f229eefdd7c38ead97dcfd 100644 (file)
@@ -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;
 
        /*