[Intel-gfx] [PATCH] drm/i915: fix itnull.cocci warnings (fwd)

Julia Lawall julia.lawall at lip6.fr
Mon Jan 18 07:49:06 PST 2016


List_for_each entry binds its first argument to an offset from the list
pointer, so this should not be NULL.

Generated by: scripts/coccinelle/iterators/itnull.cocci

Signed-off-by: Fengguang Wu <fengguang.wu at intel.com>
---

Please take the patch only if it's a positive warning. Thanks!

 intel_display.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -16498,7 +16498,7 @@ void intel_modeset_preclose(struct drm_d
 		struct intel_flip_work *work;

 		list_for_each_entry(work, &crtc->flip_work, head) {
-			if (work && work->event &&
+			if (work->event &&
 			    work->event->base.file_priv == file) {
 				kfree(work->event);
 				work->event = NULL;


More information about the Intel-gfx mailing list