Commit 404b017d authored by Dan Carpenter's avatar Dan Carpenter Committed by Dave Airlie

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

"agpmem" is never NULL here.
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 22fb573a
......@@ -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;
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment