Commit ecda0005 authored by Alex Hung's avatar Alex Hung Committed by Alex Deucher

drm/amd/display: Skip plane when not found by stream id

[Why & How]
dml_stream_idx will be -1 when it is not found. Check and skip in such a
case as -1 is not a valid array index.

This fixes a NEGATIVE_RETURNS issue reported by Coverity.
Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
Acked-by: default avatarTom Chung <chiahsuan.chung@amd.com>
Signed-off-by: default avatarAlex Hung <alex.hung@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 9d25ac51
......@@ -465,7 +465,10 @@ void dml21_build_fams2_programming(const struct dc *dc,
}
dml_stream_idx = dml21_helper_find_dml_pipe_idx_by_stream_id(dml_ctx, stream->stream_id);
ASSERT(dml_stream_idx >= 0);
if (dml_stream_idx < 0) {
ASSERT(dml_stream_idx >= 0);
continue;
}
/* copy static state from PMO */
memcpy(static_state,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment