diff options
author | Dan Carpenter <error27@gmail.com> | 2010-05-07 04:39:00 -0400 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-05-26 17:16:52 -0400 |
commit | d8201ab6514f8dc1a0ccfac52c688d80976a425a (patch) | |
tree | b60c9c8eb15a91cc298cf1ddf7bd40c6616c355e /drivers/gpu | |
parent | 90a78e8f60f679b0937011314a6cda39c7449d1d (diff) |
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, | |||
576 | struct intel_encoder *intel_encoder; | 576 | struct intel_encoder *intel_encoder; |
577 | struct intel_dp_priv *dp_priv; | 577 | struct intel_dp_priv *dp_priv; |
578 | 578 | ||
579 | if (!encoder || encoder->crtc != crtc) | 579 | if (encoder->crtc != crtc) |
580 | continue; | 580 | continue; |
581 | 581 | ||
582 | intel_encoder = enc_to_intel_encoder(encoder); | 582 | intel_encoder = enc_to_intel_encoder(encoder); |
@@ -1353,7 +1353,7 @@ intel_trans_dp_port_sel (struct drm_crtc *crtc) | |||
1353 | struct intel_encoder *intel_encoder = NULL; | 1353 | struct intel_encoder *intel_encoder = NULL; |
1354 | 1354 | ||
1355 | list_for_each_entry(encoder, &mode_config->encoder_list, head) { | 1355 | list_for_each_entry(encoder, &mode_config->encoder_list, head) { |
1356 | if (!encoder || encoder->crtc != crtc) | 1356 | if (encoder->crtc != crtc) |
1357 | continue; | 1357 | continue; |
1358 | 1358 | ||
1359 | intel_encoder = enc_to_intel_encoder(encoder); | 1359 | intel_encoder = enc_to_intel_encoder(encoder); |