OSDN Git Service

drm/amd/display: check TG is non-null before checking if enabled
authorTaimur Hassan <syed.hassan@amd.com>
Tue, 20 Jun 2023 21:00:28 +0000 (17:00 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 18 Jul 2023 15:13:55 +0000 (11:13 -0400)
commitab02d4ae4a4313568761b4877a2eee3e7579ef34
treec3b4babd49eeab165ab8588062338386231e796b
parente198a746fc1bc009e3f0e7b9436553ccdd4f6cc1
drm/amd/display: check TG is non-null before checking if enabled

[Why & How]
If there is no TG allocation we can dereference a NULL pointer when
checking if the TG is enabled.

Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Taimur Hassan <syed.hassan@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/dcn10/dcn10_hw_sequencer.c