mirror_ubuntu-kernels/drivers/gpu/drm/amd/display
Alex Hung 3ac31c9a70 drm/amd/display: Do not return negative stream id for array
[WHY]
resource_stream_to_stream_idx returns an array index and it return -1
when not found; however, -1 is not a valid array index number.

[HOW]
When this happens, call ASSERT(), and return a zero instead.

This fixes an OVERRUN and an NEGATIVE_RETURNS issues reported by Coverity.

Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Acked-by: Wayne Lin <wayne.lin@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2024-04-26 17:22:44 -04:00
..
amdgpu_dm drm/amdgpu: add protype for print ip state 2024-04-26 17:22:39 -04:00
dc drm/amd/display: Do not return negative stream id for array 2024-04-26 17:22:44 -04:00
dmub drm/amd/display: Expand dmub_cmd operations 2024-04-16 21:25:37 -04:00
include drm/amd/display: Add a function for checking tmds mode 2024-04-12 00:36:47 -04:00
modules drm/amd/display: Check index msg_id before read or write 2024-04-26 17:22:43 -04:00
Kconfig drm/amd/display: Allow building DC with clang on RISC-V 2023-07-21 16:52:25 -04:00
Makefile drm/amd/display: Refactor DPP into a component directory 2024-03-20 13:37:37 -04:00