All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch -next] i915/intel_sdvo: remove unneeded null check
@ 2010-05-07  8:40 ` Dan Carpenter
  0 siblings, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2010-05-07  8:40 UTC (permalink / raw)
  To: David Airlie
  Cc: Eric Anholt, Zhao Yakui, Ma Ling, Zhenyu Wang, Keith Packard,
	dri-devel, linux-kernel, kernel-janitors

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>

diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index 42ceb15..179d146 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -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;
 			}
 		}

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [patch -next] i915/intel_sdvo: remove unneeded null check
@ 2010-05-07  8:40 ` Dan Carpenter
  0 siblings, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2010-05-07  8:40 UTC (permalink / raw)
  To: David Airlie
  Cc: Eric Anholt, Zhao Yakui, Ma Ling, Zhenyu Wang, Keith Packard,
	dri-devel, linux-kernel, kernel-janitors

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>

diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index 42ceb15..179d146 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -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;
 			}
 		}

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [patch -next] i915/intel_sdvo: remove unneeded null check
  2010-05-07  8:40 ` Dan Carpenter
@ 2010-05-26 21:16   ` Eric Anholt
  -1 siblings, 0 replies; 5+ messages in thread
From: Eric Anholt @ 2010-05-26 21:16 UTC (permalink / raw)
  To: Dan Carpenter, David Airlie
  Cc: Zhao Yakui, Ma Ling, Zhenyu Wang, Keith Packard, dri-devel,
	linux-kernel, kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 230 bytes --]

On Fri, 7 May 2010 10:40:09 +0200, Dan Carpenter <error27@gmail.com> wrote:
> 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!

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch -next] i915/intel_sdvo: remove unneeded null check
@ 2010-05-26 21:16   ` Eric Anholt
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Anholt @ 2010-05-26 21:16 UTC (permalink / raw)
  To: Dan Carpenter, David Airlie
  Cc: Zhao Yakui, Ma Ling, Zhenyu Wang, Keith Packard, dri-devel,
	linux-kernel, kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 230 bytes --]

On Fri, 7 May 2010 10:40:09 +0200, Dan Carpenter <error27@gmail.com> wrote:
> 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!

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch -next] i915/intel_sdvo: remove unneeded null check
  2010-05-07  8:40 ` Dan Carpenter
  (?)
  (?)
@ 2010-05-26 21:16 ` Eric Anholt
  -1 siblings, 0 replies; 5+ messages in thread
From: Eric Anholt @ 2010-05-26 21:16 UTC (permalink / raw)
  To: Dan Carpenter, David Airlie
  Cc: Keith Packard, Ma Ling, kernel-janitors, linux-kernel, dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 230 bytes --]

On Fri, 7 May 2010 10:40:09 +0200, Dan Carpenter <error27@gmail.com> wrote:
> 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!

[-- 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] 5+ messages in thread

end of thread, other threads:[~2010-05-26 21:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-07  8:40 [patch -next] i915/intel_sdvo: remove unneeded null check Dan Carpenter
2010-05-07  8:40 ` Dan Carpenter
2010-05-26 21:16 ` Eric Anholt
2010-05-26 21:16   ` Eric Anholt
2010-05-26 21:16 ` 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.