From: Dan Carpenter Date: Thu, 19 Aug 2010 09:39:57 +0000 (+0200) Subject: drm: fix end of loop test X-Git-Tag: v2.6.36-rc3~46^2~10 X-Git-Url: http://bbs.cooldavid.org/git/?a=commitdiff_plain;h=161c48100236916e98d33a9c8b5fc8eae6decd15;p=net-next-2.6.git drm: fix end of loop test "agpmem" is never NULL here because it is the list cursor of a list_for_each_entry() list. Signed-off-by: Dan Carpenter Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c index 3778360ecee..fda67468e60 100644 --- a/drivers/gpu/drm/drm_vm.c +++ b/drivers/gpu/drm/drm_vm.c @@ -138,7 +138,7 @@ static int drm_do_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf) break; } - if (!agpmem) + if (&agpmem->head == &dev->agp->memory) goto vm_fault_error; /*