Skip to content

Commit

Permalink
drm/radeon/radeon_connectors.c: add a NULL test before dereference
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Darren Jenkins authored and Dave Airlie committed Jan 7, 2010
1 parent 5eb2261 commit d8a7f79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/radeon/radeon_connectors.c
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,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);
}
Expand Down

0 comments on commit d8a7f79

Please sign in to comment.