]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd/display: Check dce_hwseq before dereferencing it
authorAlex Hung <alex.hung@amd.com>
Wed, 4 Jun 2025 00:30:55 +0000 (18:30 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 18 Jun 2025 16:19:20 +0000 (12:19 -0400)
[WHAT]

hws was checked for null earlier in dce110_blank_stream, indicating hws
can be null, and should be checked whenever it is used.

Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Aurabindo Pillai <aurabindo.pillai@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>
drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c

index c717cc1eca6de71a0957e5e9eda27278dc599b20..5424682247890dcae9dd939a8c066ce6145feaf3 100644 (file)
@@ -1227,7 +1227,7 @@ void dce110_blank_stream(struct pipe_ctx *pipe_ctx)
                return;
 
        if (link->local_sink && link->local_sink->sink_signal == SIGNAL_TYPE_EDP) {
-               if (!link->skip_implict_edp_power_control)
+               if (!link->skip_implict_edp_power_control && hws)
                        hws->funcs.edp_backlight_control(link, false);
                link->dc->hwss.set_abm_immediate_disable(pipe_ctx);
        }