Skip to contentSkip to conversation

drm: fix end of loop test

PATCH New Dan Carpenter 1 participant 1 message Aug 19, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm: fix end of loop test

"agpmem" is never NULL here because it is the list cursor of a list_for_each_entry() list.

drivers/gpu/drm/drm_vm.c +1 -1
index 3778360..fda6746 100644
@@ -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;
 
 		/*