aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon
diff options
context:
space:
mode:
authorDarren Jenkins <darrenrjenkins@gmail.com>2009-12-29 20:22:55 -0500
committerDave Airlie <airlied@redhat.com>2010-01-06 22:48:25 -0500
commitd8a7f79246a447722bd90c2c4ba3ca068b2aa4c0 (patch)
tree9b10e57c5ce6635b4048964a4d9107de1373a470 /drivers/gpu/drm/radeon
parent5eb226132f53d5ec36ce4e7ff9d6b49cceb50f3d (diff)
drm/radeon/radeon_connectors.c: add a NULL test before dereference
The encoder variable can be NULL in this function so I believe it should be checked before dereference. Coverity CID: 13253 [airlied: extremely unlikely to happen] Signed-off-by: Darren Jenkins <darrenrjenkins@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon')
-rw-r--r--drivers/gpu/drm/radeon/radeon_connectors.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
index 20161567dbff..b82ae61d4d17 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -615,7 +615,7 @@ static enum drm_connector_status radeon_vga_detect(struct drm_connector *connect
615 ret = connector_status_connected; 615 ret = connector_status_connected;
616 } 616 }
617 } else { 617 } else {
618 if (radeon_connector->dac_load_detect) { 618 if (radeon_connector->dac_load_detect && encoder) {
619 encoder_funcs = encoder->helper_private; 619 encoder_funcs = encoder->helper_private;
620 ret = encoder_funcs->detect(encoder, connector); 620 ret = encoder_funcs->detect(encoder, connector);
621 } 621 }