drm/amd/display: don't crash if stream is NULL when trying to share clocks

Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Yongqiang Sun
2016-12-21 11:16:48 -05:00
committed by Alex Deucher
parent d7194cf6b8
commit 0f4e66cd7d

View File

@ -288,6 +288,11 @@ static bool is_sharable_clk_src(
if (pipe_with_clk_src->clock_source == NULL)
return false;
if (pipe_with_clk_src->stream == NULL) {
ASSERT(0);
return false;
}
if (pipe_with_clk_src->stream->signal == SIGNAL_TYPE_VIRTUAL)
return false;