From: jsg Date: Wed, 27 Mar 2024 04:50:30 +0000 (+0000) Subject: drm/amd/display: Add 'replay' NULL check in 'edp_set_replay_allow_active()' X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a0e66026a87a9f0ddfc65c214af5a8c0ac4113e3;p=openbsd drm/amd/display: Add 'replay' NULL check in 'edp_set_replay_allow_active()' From Srinivasan Shanmugam f610c46771ef1047e46d61807aa7c69cd29e63d8 in linux-6.6.y/6.6.23 f6aed043ee5d75b3d1bfc452b1a9584b63c8f76b in mainline linux --- diff --git a/sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c b/sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c index 6f64aab18f0..13104d000b9 100644 --- a/sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c +++ b/sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c @@ -882,7 +882,8 @@ bool edp_set_replay_allow_active(struct dc_link *link, const bool *allow_active, /* Set power optimization flag */ if (power_opts && link->replay_settings.replay_power_opt_active != *power_opts) { - if (link->replay_settings.replay_feature_enabled && replay->funcs->replay_set_power_opt) { + if (replay != NULL && link->replay_settings.replay_feature_enabled && + replay->funcs->replay_set_power_opt) { replay->funcs->replay_set_power_opt(replay, *power_opts, panel_inst); link->replay_settings.replay_power_opt_active = *power_opts; }