drm/amd/display: Avoid MST manager resource leak.
authorAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Wed, 14 Oct 2020 17:12:30 +0000 (13:12 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 21 Oct 2020 21:33:43 +0000 (17:33 -0400)
commit5dff80bdce9e385af5716ed083f9e33e814484ab
tree5374b1e0f5dc73c0362e9be05ecb730ca08225d7
parent0d427f6c290c69827b2ca33c5f1386816992e4d8
drm/amd/display: Avoid MST manager resource leak.

On connector destruction call drm_dp_mst_topology_mgr_destroy
to release resources allocated in drm_dp_mst_topology_mgr_init.
Do it only if MST manager was initilized before otherwsie a crash
is seen on driver unload/device unplug.

Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c