drm/amdgpu/dm: Fix NULL pointer crash during DP MST hotplug
authorShashank Sharma <shashank.sharma@amd.com>
Thu, 15 Apr 2021 17:48:12 +0000 (23:18 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 15 Apr 2021 20:32:45 +0000 (16:32 -0400)
commitea9bc8b9289a6e524f0b0eeafc09addb7cfac9fd
treee1a7fea66248302f516d2c889b6572bea4fdd6dd
parentfe180178390b264ffab631eca85e97430ad77d16
drm/amdgpu/dm: Fix NULL pointer crash during DP MST hotplug

This patch checks the return value of the function
dc_link_add_remote_sink before using it. This was causing
a crash during consecutive hotplugs of DP MST displays.

Cc: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Shashank Sharma <shashank.sharma@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c