drm/amd/display: fix null dereference in reset hw ctx
authorEric Yang <Eric.Yang2@amd.com>
Thu, 5 Oct 2017 20:00:29 +0000 (16:00 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Sat, 21 Oct 2017 20:49:29 +0000 (16:49 -0400)
Signed-off-by: Eric Yang <Eric.Yang2@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>
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c

index 867a0eb..5e5763c 100644 (file)
@@ -1877,7 +1877,7 @@ static void dce110_reset_hw_ctx_wrap(
                        struct clock_source *old_clk = pipe_ctx_old->clock_source;
 
                        /* disable already, no need to disable again */
-                       if (!pipe_ctx->stream->dpms_off)
+                       if (pipe_ctx->stream && !pipe_ctx->stream->dpms_off)
                                core_link_disable_stream(pipe_ctx_old, FREE_ACQUIRED_RESOURCE);
 
                        pipe_ctx_old->stream_res.tg->funcs->set_blank(pipe_ctx_old->stream_res.tg, true);