linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* drivers/gpu/drm/radeon/radeon_connectors.c: add a NULL test before dereference
@ 2009-12-24 13:08 Darren Jenkins
  0 siblings, 0 replies; only message in thread
From: Darren Jenkins @ 2009-12-24 13:08 UTC (permalink / raw)
  To: David Airlie, dri-devel mailing list, Kernel Janitors
  Cc: Linux Kernel Mailing List

The encoder variable can be NULL in this function so I believe it should
be checked before dereference.

Coverity CID: 13253

Signed-off-by: Darren Jenkins <darrenrjenkins@gmail.com>
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c
b/drivers/gpu/drm/radeon/radeon_connectors.c
index 5eece18..3ba86fc 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -603,7 +603,7 @@ static enum drm_connector_status
radeon_vga_detect(struct drm_connector *connect
 				ret = connector_status_connected;
 		}
 	} else {
-		if (radeon_connector->dac_load_detect) {
+		if (radeon_connector->dac_load_detect && encoder) {
 			encoder_funcs = encoder->helper_private;
 			ret = encoder_funcs->detect(encoder, connector);
 		}



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-12-24 13:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-24 13:08 drivers/gpu/drm/radeon/radeon_connectors.c: add a NULL test before dereference Darren Jenkins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).