Skip to contentSkip to conversation

i915/intel_sdvo: remove unneeded null check

PATCH Applied Dan Carpenter 2 participants 3 messages May 7, 2010 – May 26, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i915/intel_sdvo: remove unneeded null check

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.

drivers/gpu/drm/i915/intel_sdvo.c +1 -1
index 42ceb15..179d146 100644
@@ -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;
 			}
 		}
Applied
#1 lore raw
Quoted 3 lines · Dan Carpenter

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.

Applied. Thanks!