aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorLeo (Sunpeng) Li <sunpeng.li@amd.com>2017-11-07 15:54:58 -0500
committerAlex Deucher <alexander.deucher@amd.com>2017-12-06 12:47:41 -0500
commite7f93e906748499951a76e9035ac8f6e85c0a110 (patch)
treec57d26cda499d994160bd63c85d37523023fc170 /drivers/gpu
parentb674f1edc9a033f4d3ea61e5f4996186e27bdcb5 (diff)
drm/amd/display: Early return on stream programming failure
The fail goto is incorrect. It will incorrectly release the dc_states on stream programming failure. Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/amd/display/dc/core/dc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index e8ec2b0bd90b..3808b562a59f 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -899,7 +899,7 @@ static enum dc_status dc_commit_state_no_check(struct dc *dc, struct dc_state *c
result = dc->hwss.apply_ctx_to_hw(dc, context);
if (result != DC_OK)
- goto fail;
+ return result;
if (context->stream_count > 1) {
enable_timing_multisync(dc, context);
@@ -938,7 +938,6 @@ static enum dc_status dc_commit_state_no_check(struct dc *dc, struct dc_state *c
context->streams[i]->timing.pix_clk_khz);
}
-fail:
dc_enable_stereo(dc, context, dc_streams, context->stream_count);
dc_release_state(dc->current_state);