From: jsg Date: Fri, 18 Oct 2024 00:06:16 +0000 (+0000) Subject: drm/amd/display: Check null pointer before dereferencing se X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a6296ef06b0d57009d074324c00d085c45ed3ad5;p=openbsd drm/amd/display: Check null pointer before dereferencing se From Alex Hung 65b2d49e55fe13ae56da3a7685bdccadca31134a in linux-6.6.y/6.6.57 ff599ef6970ee000fa5bc38d02fa5ff5f3fc7575 in mainline linux --- diff --git a/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c b/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c index a7a6f6c5c76..c2efe18ceac 100644 --- a/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c +++ b/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c @@ -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(