From: Yingjie Wang Date: Wed, 7 Apr 2021 03:10:04 +0000 (-0700) Subject: drm/radeon: Fix a missing check bug in radeon_dp_mst_detect() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=25315ebfaefcffd126a266116b37bb8a3d1c4620;p=linux.git drm/radeon: Fix a missing check bug in radeon_dp_mst_detect() In radeon_dp_mst_detect(), We should check whether or not @connector has been unregistered from userspace. If the connector is unregistered, we should return disconnected status. Fixes: 9843ead08f18 ("drm/radeon: add DisplayPort MST support (v2)") Signed-off-by: Yingjie Wang Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/radeon/radeon_dp_mst.c b/drivers/gpu/drm/radeon/radeon_dp_mst.c index 66a0e736cc4da..59cf1d288465a 100644 --- a/drivers/gpu/drm/radeon/radeon_dp_mst.c +++ b/drivers/gpu/drm/radeon/radeon_dp_mst.c @@ -241,6 +241,9 @@ radeon_dp_mst_detect(struct drm_connector *connector, to_radeon_connector(connector); struct radeon_connector *master = radeon_connector->mst_port; + if (drm_connector_is_unregistered(connector)) + return connector_status_disconnected; + return drm_dp_mst_detect_port(connector, ctx, &master->mst_mgr, radeon_connector->port); }