From: Dan Carpenter <error27@gmail.com>
To: David Airlie <airlied@linux.ie>
Cc: Eric Anholt <eric@anholt.net>, Zhao Yakui <yakui.zhao@intel.com>,
Ma Ling <ling.ma@intel.com>,
Zhenyu Wang <zhenyuw@linux.intel.com>,
Keith Packard <keithp@keithp.com>,
dri-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [patch -next] i915/intel_sdvo: remove unneeded null check
Date: Fri, 7 May 2010 10:40:09 +0200 [thread overview]
Message-ID: <20100507084009.GZ27064@bicker> (raw)
The "connector" variable is used as the cursor in a
list_for_each_entry() and it's always non-null so we don't need to check
it.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index 42ceb15..179d146 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1479,7 +1479,7 @@ intel_find_analog_connector(struct drm_device *dev)
intel_encoder = enc_to_intel_encoder(encoder);
if (intel_encoder->type == INTEL_OUTPUT_ANALOG) {
list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
- if (connector && encoder == intel_attached_encoder(connector))
+ if (encoder == intel_attached_encoder(connector))
return connector;
}
}
next reply other threads:[~2010-05-07 8:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-07 8:40 Dan Carpenter [this message]
2010-05-26 21:16 ` [patch -next] i915/intel_sdvo: remove unneeded null check 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=20100507084009.GZ27064@bicker \
--to=error27@gmail.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.sourceforge.net \
--cc=eric@anholt.net \
--cc=keithp@keithp.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=ling.ma@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=yakui.zhao@intel.com \
--cc=zhenyuw@linux.intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox