diff options
author | Dan Carpenter <error27@gmail.com> | 2010-05-07 10:39:00 +0200 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-05-26 14:16:52 -0700 |
commit | d8201ab6514f8dc1a0ccfac52c688d80976a425a (patch) | |
tree | b60c9c8eb15a91cc298cf1ddf7bd40c6616c355e /drivers/gpu | |
parent | 90a78e8f60f679b0937011314a6cda39c7449d1d (diff) | |
download | blackbird-op-linux-d8201ab6514f8dc1a0ccfac52c688d80976a425a.tar.gz blackbird-op-linux-d8201ab6514f8dc1a0ccfac52c688d80976a425a.zip |
i915: remove unneeded null checks
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>
Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/intel_dp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 0a11c657c949..49b54f05d3cf 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); @@ -1353,7 +1353,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); |