All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] drm: fix end of loop test
@ 2010-08-19  9:39 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2010-08-19  9:39 UTC (permalink / raw)
  To: David Airlie; +Cc: Dave Airlie, kernel-janitors, Alexey Dobriyan, dri-devel

"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>

diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c
index 3778360..fda6746 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;
 
 		/*

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [patch] drm: fix end of loop test
@ 2010-08-19  9:39 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2010-08-19  9:39 UTC (permalink / raw)
  To: David Airlie; +Cc: Dave Airlie, kernel-janitors, Alexey Dobriyan, dri-devel

"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>

diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c
index 3778360..fda6746 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;
 
 		/*

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-08-19  9:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-19  9:39 [patch] drm: fix end of loop test Dan Carpenter
2010-08-19  9:39 ` Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.