drm/amd/display: Fix the uninitialized variable in enable_stream_features()
authorYizhuo Zhai <yzhai003@ucr.edu>
Sat, 18 Dec 2021 04:22:23 +0000 (20:22 -0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 30 Dec 2021 13:54:45 +0000 (08:54 -0500)
commit0726ed3065eeb910f9cea0c933bc021a848e00b3
tree9331b02bed051e25e76717f6c774bc2f3693dced
parent937ed9c8660a27ac4d36e8339c970a2ae7903c4d
drm/amd/display: Fix the uninitialized variable in enable_stream_features()

In function enable_stream_features(), the variable "old_downspread.raw"
could be uninitialized if core_link_read_dpcd() fails, however, it is
used in the later if statement, and further, core_link_write_dpcd()
may write random value, which is potentially unsafe.

Fixes: 6016cd9dba0f ("drm/amd/display: add helper for enabling mst stream features")
Cc: stable@vger.kernel.org
Signed-off-by: Yizhuo Zhai <yzhai003@ucr.edu>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_link.c