i915/intel_sdvo: remove unneeded null check
authorDan Carpenter <error27@gmail.com>
Fri, 7 May 2010 08:40:09 +0000 (10:40 +0200)
committerEric Anholt <eric@anholt.net>
Wed, 26 May 2010 21:16:35 +0000 (14:16 -0700)
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>
Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/i915/intel_sdvo.c

index aba72c489a2f07941fc69d88516fb2a52f086363..76993ac16cc1b1b84ca4c4ff102458ae47f76c80 100644 (file)
@@ -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;
                        }
                }