drm/amd/display: set NULL value during removal for remoteSink
authorLeon Elazar <leon.elazar@amd.com>
Mon, 10 Apr 2017 13:37:11 +0000 (09:37 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 26 Sep 2017 21:23:32 +0000 (17:23 -0400)
In MST case during removal of remote sink its descriptor pointer wasn't freed corectly.

Signed-off-by: Leon Elazar <leon.elazar@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c

index 203cb9d0c89d0d1a0051fa16d8a67d91fcb6e643..70dc02cf4dbb21182745fc63e9f75d4e6baf6d74 100644 (file)
@@ -1787,7 +1787,7 @@ void dc_link_remove_remote_sink(const struct dc_link *link, const struct dc_sink
                                dc_link->remote_sinks[i] = dc_link->remote_sinks[i+1];
                                i++;
                        }
-
+                       dc_link->remote_sinks[i] = NULL;
                        dc_link->sink_count--;
                        return;
                }