drm/amd/display: add null check
authorPeichen Huang <PeiChen.Huang@amd.com>
Thu, 12 Jun 2025 08:06:41 +0000 (16:06 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 30 Jun 2025 15:58:29 +0000 (11:58 -0400)
commit158b9201c17fc93ed4253c2f03b77fd2671669a1
treeb42091b68c37116343b686a7196358699a4e2bdf
parent38b20968f3d8a603a979ac50ff6cf3553e0b3daf
drm/amd/display: add null check

[WHY]
Prevents null pointer dereferences to enhance function robustness

[HOW]
Adds early null check and return false if invalid.

Reviewed-by: Cruise Hung <cruise.hung@amd.com>
Signed-off-by: Peichen Huang <PeiChen.Huang@amd.com>
Signed-off-by: Ray Wu <ray.wu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c