drm: fix end of loop test
authorDan Carpenter <error27@gmail.com>
Thu, 19 Aug 2010 09:39:57 +0000 (11:39 +0200)
committerDave Airlie <airlied@redhat.com>
Thu, 19 Aug 2010 22:48:34 +0000 (08:48 +1000)
"agpmem" is never NULL here because it is the list cursor of a
list_for_each_entry() list.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_vm.c

index 3778360eceea0cc44d2f2213090d5e1ed2e670f4..fda67468e603b6169393b92bc4922afef8b4d8ce 100644 (file)
@@ -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;
 
                /*