All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: fix itnull.cocci warnings (fwd)
@ 2016-01-18 15:49 ` Julia Lawall
  0 siblings, 0 replies; 12+ messages in thread
From: Julia Lawall @ 2016-01-18 15:49 UTC (permalink / raw)
  To: Maarten Lankhorst
  Cc: kbuild-all, Daniel Vetter, Jani Nikula, David Airlie, intel-gfx,
	dri-devel, linux-kernel

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@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;

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

end of thread, other threads:[~2016-01-20 10:05 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-18 15:49 [PATCH] drm/i915: fix itnull.cocci warnings (fwd) Julia Lawall
2016-01-18 15:49 ` Julia Lawall
2016-01-18 17:20 ` [Intel-gfx] " Daniel Vetter
2016-01-18 17:20   ` Daniel Vetter
2016-01-18 17:42   ` Eric Engestrom
2016-01-18 17:42     ` Eric Engestrom
2016-01-18 18:02     ` Daniel Vetter
2016-01-18 18:02       ` Daniel Vetter
2016-01-18 20:20   ` [Intel-gfx] " Julia Lawall
2016-01-18 20:20     ` Julia Lawall
2016-01-20 10:05   ` [Intel-gfx] " Maarten Lankhorst
2016-01-20 10:05     ` Maarten Lankhorst

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.