drm/amd/display: Check null pointer before dereferencing se
authorjsg <jsg@openbsd.org>
Fri, 18 Oct 2024 00:06:16 +0000 (00:06 +0000)
committerjsg <jsg@openbsd.org>
Fri, 18 Oct 2024 00:06:16 +0000 (00:06 +0000)
From Alex Hung
65b2d49e55fe13ae56da3a7685bdccadca31134a in linux-6.6.y/6.6.57
ff599ef6970ee000fa5bc38d02fa5ff5f3fc7575 in mainline linux

sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c

index a7a6f6c..c2efe18 100644 (file)
@@ -1691,7 +1691,7 @@ bool dc_validate_boot_timing(const struct dc *dc,
                if (crtc_timing->pix_clk_100hz != pix_clk_100hz)
                        return false;
 
-               if (!se->funcs->dp_get_pixel_format)
+               if (!se || !se->funcs->dp_get_pixel_format)
                        return false;
 
                if (!se->funcs->dp_get_pixel_format(