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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jul 2023 06:50:29 +0000 (08:50 +0200)
commit889bac5fd7969b745c0554155852ce1e3c140497
tree4c0add353c4c9c2338a188188b8a247dc430f27c
parent9f28e8c2be1e1a8077f139121b01d139cb60b4b5
drm/amd/display: check TG is non-null before checking if enabled

commit 5a25cefc0920088bb9afafeb80ad3dcd84fe278b upstream.

[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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c