drm/amd/display: Null check clock source.
authorYongqiang Sun <yongqiang.sun@amd.com>
Wed, 11 Jan 2017 20:52:06 +0000 (15:52 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 26 Sep 2017 21:09:44 +0000 (17:09 -0400)
Signed-off-by: Yongqiang Sun <yongqiang.sun@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_link_hwss.c

index 55d96656e54bce253541622e1401e7a6333831f8..b0ac94d673c484434357446a834fe2b98bd75633 100644 (file)
@@ -74,7 +74,8 @@ void dp_enable_link_phy(
                if (pipes[i].stream != NULL &&
                        pipes[i].stream->sink != NULL &&
                        pipes[i].stream->sink->link == link) {
-                       if (pipes[i].clock_source->id != CLOCK_SOURCE_ID_DP_DTO) {
+                       if (pipes[i].clock_source != NULL &&
+                                       pipes[i].clock_source->id != CLOCK_SOURCE_ID_DP_DTO) {
                                pipes[i].clock_source = dp_cs;
                                pipes[i].pix_clk_params.requested_pix_clk =
                                                pipes[i].stream->public.timing.pix_clk_khz;