瀏覽代碼

drm/amd/display: Don't blow up if TG is NULL in dce110_vblank_set

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Roman Li <Roman.Li@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Harry Wentland 7 年之前
父節點
當前提交
3573d598b8
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/gpu/drm/amd/display/dc/irq/dce110/irq_service_dce110.c

+ 1 - 1
drivers/gpu/drm/amd/display/dc/irq/dce110/irq_service_dce110.c

@@ -217,7 +217,7 @@ bool dce110_vblank_set(
 			core_dc->current_state->res_ctx.pipe_ctx[pipe_offset].stream_res.tg;
 			core_dc->current_state->res_ctx.pipe_ctx[pipe_offset].stream_res.tg;
 
 
 	if (enable) {
 	if (enable) {
-		if (!tg->funcs->arm_vert_intr(tg, 2)) {
+		if (!tg || !tg->funcs->arm_vert_intr(tg, 2)) {
 			DC_ERROR("Failed to get VBLANK!\n");
 			DC_ERROR("Failed to get VBLANK!\n");
 			return false;
 			return false;
 		}
 		}