All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Anholt <eric@anholt.net>
To: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org, David Airlie <airlied@linux.ie>,
	Julia Lawall <julia.lawall@lip6.fr>,
	Fengguang Wu <fengguang.wu@intel.com>,
	Eric Anholt <eric@anholt.net>
Subject: [PATCH 3/6] drm/vc4: fix itnull.cocci warnings
Date: Fri, 23 Oct 2015 11:32:33 +0100	[thread overview]
Message-ID: <1445596356-28202-4-git-send-email-eric@anholt.net> (raw)
In-Reply-To: <1445596356-28202-1-git-send-email-eric@anholt.net>

From: Julia Lawall <julia.lawall@lip6.fr>

Connector cannot be null because it is a list entry, ie accessed at an
offset from the positions of the list structure pointers themselves.

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

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Eric Anholt <eric@anholt.net>
---
 drivers/gpu/drm/vc4/vc4_crtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c
index 8489d5b..a3a77dd 100644
--- a/drivers/gpu/drm/vc4/vc4_crtc.c
+++ b/drivers/gpu/drm/vc4/vc4_crtc.c
@@ -168,7 +168,7 @@ static int vc4_get_clock_select(struct drm_crtc *crtc)
 	struct drm_connector *connector;
 
 	drm_for_each_connector(connector, crtc->dev) {
-		if (connector && connector->state->crtc == crtc) {
+		if (connector->state->crtc == crtc) {
 			struct drm_encoder *encoder = connector->encoder;
 			struct vc4_encoder *vc4_encoder =
 				to_vc4_encoder(encoder);
-- 
2.6.1


  parent reply	other threads:[~2015-10-23 10:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-23 10:32 VC4 fixes for -next Eric Anholt
2015-10-23 10:32 ` Eric Anholt
2015-10-23 10:32 ` [PATCH 1/6] drm/vc4: vc4_plane_duplicate_state() can be static Eric Anholt
2015-10-23 10:32   ` Eric Anholt
2015-10-23 10:32 ` [PATCH 2/6] drm/vc4: fix platform_no_drv_owner.cocci warnings Eric Anholt
2015-10-23 10:32   ` Eric Anholt
2015-10-23 10:32 ` Eric Anholt [this message]
2015-10-23 10:32 ` [PATCH 4/6] drm/vc4: Fix some failure to track __iomem decorations on pointers Eric Anholt
2015-10-23 10:32   ` Eric Anholt
2015-10-23 14:04   ` Ilia Mirkin
2015-10-23 16:34     ` Eric Anholt
2015-10-23 10:32 ` [PATCH 5/6] drm/vc4: Make sure that planes aren't scaled Eric Anholt
2015-10-23 10:32   ` Eric Anholt
2015-10-23 11:24   ` Daniel Vetter
2015-10-23 11:24     ` Daniel Vetter
2015-10-23 10:32 ` [PATCH 6/6] drm/vc4: Add support for more a few more RGB display plane formats Eric Anholt
2015-10-23 10:32   ` Eric Anholt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1445596356-28202-4-git-send-email-eric@anholt.net \
    --to=eric@anholt.net \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=fengguang.wu@intel.com \
    --cc=julia.lawall@lip6.fr \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.