[PATCH 58/73] drm/amd/display: Early return on stream programming failure
Harry Wentland
harry.wentland at amd.com
Thu Nov 9 20:05:54 UTC 2017
From: "Leo (Sunpeng) Li" <sunpeng.li at amd.com>
The fail goto is incorrect. It will incorrectly release the dc_states on
stream programming failure.
Change-Id: Ifefa4561266aaef10235e02dc687f5c0f637e6c1
Signed-off-by: Leo (Sunpeng) Li <sunpeng.li at amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng at amd.com>
Acked-by: Harry Wentland <harry.wentland at amd.com>
---
drivers/gpu/drm/amd/display/dc/core/dc.c | 3 +--
1 file changed, 1 insertion(+), 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 c1ae293b41b3..1ccc0c018b0e 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -893,7 +893,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);
@@ -932,7 +932,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);
--
2.14.1
More information about the amd-gfx
mailing list