drm/amd/display: Skip updating link encoder for unknown eng_id
authorAlex Hung <alex.hung@amd.com>
Mon, 22 Apr 2024 16:34:17 +0000 (10:34 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 2 May 2024 20:18:17 +0000 (16:18 -0400)
commitefabdce3db9f3d306084c8946983f3d895810a6b
treeda7d6eb3b0d9f9c4837d14c83b7048ad47cab7ee
parentb38a4815f79b87efb196cd5121579fc51e29a7fb
drm/amd/display: Skip updating link encoder for unknown eng_id

This prevents accessing to negative index of link_encoders array.

This fixes an OVERRUN issue reported by Coverity.

Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@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/link/link_factory.c