drm/amd/display: Add 'replay' NULL check in 'edp_set_replay_allow_active()'
authorjsg <jsg@openbsd.org>
Wed, 27 Mar 2024 04:50:30 +0000 (04:50 +0000)
committerjsg <jsg@openbsd.org>
Wed, 27 Mar 2024 04:50:30 +0000 (04:50 +0000)
From Srinivasan Shanmugam
f610c46771ef1047e46d61807aa7c69cd29e63d8 in linux-6.6.y/6.6.23
f6aed043ee5d75b3d1bfc452b1a9584b63c8f76b in mainline linux

sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c

index 6f64aab..13104d0 100644 (file)
@@ -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;
                }