]> www.infradead.org Git - users/dwmw2/linux.git/commit
drm/amd/display: Skip plane when not found by stream id
authorAlex Hung <alex.hung@amd.com>
Fri, 26 Apr 2024 16:02:55 +0000 (10:02 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 2 May 2024 20:18:18 +0000 (16:18 -0400)
commitecda00059b14b95a5b84f3efc1c1f341e1fd7dbc
tree7fea19824eec1d21b6eca117d64686a8cc29caf8
parent9d25ac51f5bc952a4454bad9c0d0ca09c3827003
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: Harry Wentland <harry.wentland@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_utils.c