]> www.infradead.org Git - nvme.git/commit
drm/amd/display: Check link_res->hpo_dp_link_enc before using it
authorAlex Hung <alex.hung@amd.com>
Thu, 27 Jun 2024 22:45:39 +0000 (16:45 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 23 Jul 2024 21:07:12 +0000 (17:07 -0400)
commit0beca868cde8742240cd0038141c30482d2b7eb8
treea99d7aea001b8e8fe66e6bdfff39a084e062ce48
parent9932ca4c03c8181601f611dd366fceb765329800
drm/amd/display: Check link_res->hpo_dp_link_enc before using it

[WHAT & HOW]
Functions dp_enable_link_phy and dp_disable_link_phy can pass link_res
without initializing hpo_dp_link_enc and it is necessary to check for
null before dereferencing.

This fixes 2 FORWARD_NULL issues reported by Coverity.

Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Signed-off-by: Jerry Zuo <jerry.zuo@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/hwss/link_hwss_hpo_dp.c