]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/amd/display: Avoid a NULL pointer dereference
authorMario Limonciello <mario.limonciello@amd.com>
Thu, 24 Jul 2025 20:00:43 +0000 (15:00 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 18 Aug 2025 21:56:25 +0000 (17:56 -0400)
commit07b93a5704b0b72002f0c4bd1076214af67dc661
treedfda086a41c263bad004def84b34d6ca7aabdce9
parent79e25cd06e85105c75701ef1773c6c64bb304091
drm/amd/display: Avoid a NULL pointer dereference

[WHY]
Although unlikely drm_atomic_get_new_connector_state() or
drm_atomic_get_old_connector_state() can return NULL.

[HOW]
Check returns before dereference.

Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Tested-by: Dan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 1e5e8d672fec9f2ab352be121be971877bff2af9)
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c