Skip to content

Commit

Permalink
drm: fix end of loop test
Browse files Browse the repository at this point in the history
"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>
  • Loading branch information
Dan Carpenter authored and Dave Airlie committed Aug 19, 2010
1 parent 6f50eae commit 161c481
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/drm_vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/*
Expand Down

0 comments on commit 161c481

Please sign in to comment.