From: Wenjing Liu <wenjing....@amd.com>

[why]
There is a coding error for a missing null check for stream pointer when 
iterating through
pipe_ctx.

Reviewed-by: Martin Leung <martin.le...@amd.com>
Acked-by: Jasdeep Dhillon <jdhil...@amd.com>
Signed-off-by: Wenjing Liu <wenjing....@amd.com>
---
 drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c 
b/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c
index ab47475c18ae..133bc4085c78 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c
@@ -1289,7 +1289,7 @@ static void apply_symclk_on_tx_off_wa(struct dc_link 
*link)
        if (link->phy_state.symclk_ref_cnts.otg > 0) {
                for (i = 0; i < MAX_PIPES; i++) {
                        pipe_ctx = &dc->current_state->res_ctx.pipe_ctx[i];
-                       if (pipe_ctx->stream->link == link && 
pipe_ctx->top_pipe == NULL) {
+                       if (pipe_ctx->stream && pipe_ctx->stream->link == link 
&& pipe_ctx->top_pipe == NULL) {
                                pipe_ctx->clock_source->funcs->program_pix_clk(
                                                pipe_ctx->clock_source,
                                                
&pipe_ctx->stream_res.pix_clk_params,
-- 
2.25.1

Reply via email to