mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-28 16:56:26 +00:00
drm/amd/display: enable_hpo_dp_link_output: Check link_res->hpo_dp_link_enc before using it
commitd925c04d97
upstream. [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 1 FORWARD_NULL issue reported by Coverity. Fixes:0beca868cd
("drm/amd/display: Check link_res->hpo_dp_link_enc before using it") Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
e34ddcce00
commit
df8d896f8f
@ -110,6 +110,11 @@ void enable_hpo_dp_link_output(struct dc_link *link,
|
||||
enum clock_source_id clock_source,
|
||||
const struct dc_link_settings *link_settings)
|
||||
{
|
||||
if (!link_res->hpo_dp_link_enc) {
|
||||
DC_LOG_ERROR("%s: invalid hpo_dp_link_enc\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
if (link->dc->res_pool->dccg->funcs->set_symclk32_le_root_clock_gating)
|
||||
link->dc->res_pool->dccg->funcs->set_symclk32_le_root_clock_gating(
|
||||
link->dc->res_pool->dccg,
|
||||
|
Loading…
Reference in New Issue
Block a user