drm/amd/dc: Fix a missing check bug in dm_dp_mst_detect()
authorjsg <jsg@openbsd.org>
Thu, 15 Jul 2021 01:24:07 +0000 (01:24 +0000)
committerjsg <jsg@openbsd.org>
Thu, 15 Jul 2021 01:24:07 +0000 (01:24 +0000)
From Yingjie Wang
5885fce7b43919406b32d1c942c9b496aac3abbc in linux 5.10.y/5.10.50
655c0ed19772d92c9665ed08bdc5202acc096dda in mainline linux

sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c

index 1e448f1..955a055 100644 (file)
@@ -268,6 +268,9 @@ dm_dp_mst_detect(struct drm_connector *connector,
        struct amdgpu_dm_connector *aconnector = to_amdgpu_dm_connector(connector);
        struct amdgpu_dm_connector *master = aconnector->mst_port;
 
+       if (drm_connector_is_unregistered(connector))
+               return connector_status_disconnected;
+
        return drm_dp_mst_detect_port(connector, ctx, &master->mst_mgr,
                                      aconnector->port);
 }