* [patch -next] i915: remove unneeded null checks
@ 2010-05-07 8:39 Dan Carpenter
2010-05-26 21:17 ` Eric Anholt
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-05-07 8:39 UTC (permalink / raw)
To: David Airlie; +Cc: Keith Packard, dri-devel
The "encoder" variable can never be null because it is used as loop
cursor in a list_for_each_entry() loop.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index f6299bb..950dc8d 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -576,7 +576,7 @@ intel_dp_set_m_n(struct drm_crtc *crtc, struct drm_display_mode *mode,
struct intel_encoder *intel_encoder;
struct intel_dp_priv *dp_priv;
- if (!encoder || encoder->crtc != crtc)
+ if (encoder->crtc != crtc)
continue;
intel_encoder = enc_to_intel_encoder(encoder);
@@ -1352,7 +1352,7 @@ intel_trans_dp_port_sel (struct drm_crtc *crtc)
struct intel_encoder *intel_encoder = NULL;
list_for_each_entry(encoder, &mode_config->encoder_list, head) {
- if (!encoder || encoder->crtc != crtc)
+ if (encoder->crtc != crtc)
continue;
intel_encoder = enc_to_intel_encoder(encoder);
------------------------------------------------------------------------------
--
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch -next] i915: remove unneeded null checks
2010-05-07 8:39 [patch -next] i915: remove unneeded null checks Dan Carpenter
@ 2010-05-26 21:17 ` Eric Anholt
0 siblings, 0 replies; 2+ messages in thread
From: Eric Anholt @ 2010-05-26 21:17 UTC (permalink / raw)
To: Dan Carpenter, David Airlie; +Cc: Keith Packard, dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 268 bytes --]
On Fri, 7 May 2010 10:39:00 +0200, Dan Carpenter <error27@gmail.com> wrote:
> The "encoder" variable can never be null because it is used as loop
> cursor in a list_for_each_entry() loop.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Applied. Thanks!
[-- Attachment #1.2: Type: application/pgp-signature, Size: 197 bytes --]
[-- Attachment #2: Type: text/plain, Size: 80 bytes --]
------------------------------------------------------------------------------
[-- Attachment #3: Type: text/plain, Size: 161 bytes --]
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-05-26 21:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-07 8:39 [patch -next] i915: remove unneeded null checks Dan Carpenter
2010-05-26 21:17 ` Eric Anholt
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.