From: jsg Date: Fri, 11 Oct 2024 03:00:56 +0000 (+0000) Subject: drm/amd/display: enable_hpo_dp_link_output: Check link_res->hpo_dp_link_enc before... X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=fcdb63029ed4f0b0f9a71749e1bed1e333fd8289;p=openbsd drm/amd/display: enable_hpo_dp_link_output: Check link_res->hpo_dp_link_enc before using it From Alex Hung e0b065ec636d66022ab7057e1635e9a941a42820 in linux-6.6.y/6.6.55 d925c04d974c657d10471c0c2dba3bc9c7d994ee in mainline linux --- diff --git a/sys/dev/pci/drm/amd/display/dc/link/hwss/link_hwss_hpo_dp.c b/sys/dev/pci/drm/amd/display/dc/link/hwss/link_hwss_hpo_dp.c index d0b0553dbdd..9a349de0f6d 100644 --- a/sys/dev/pci/drm/amd/display/dc/link/hwss/link_hwss_hpo_dp.c +++ b/sys/dev/pci/drm/amd/display/dc/link/hwss/link_hwss_hpo_dp.c @@ -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,