From: Harry Wentland Date: Tue, 13 Feb 2018 16:07:43 +0000 (-0500) Subject: drm/amd/display: Don't blow up if TG is NULL in dce110_vblank_set X-Git-Tag: Ubuntu-5.4-5.4.0-11.14~5718^2~18^2~47 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=c827206f7f78a33eff9496201c4122c246c87db3;p=mirror_ubuntu-focal-kernel.git drm/amd/display: Don't blow up if TG is NULL in dce110_vblank_set Signed-off-by: Harry Wentland Reviewed-by: Roman Li Acked-by: Harry Wentland Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/dc/irq/dce110/irq_service_dce110.c b/drivers/gpu/drm/amd/display/dc/irq/dce110/irq_service_dce110.c index 9bc1c1d90bad..afe0876fe6f8 100644 --- a/drivers/gpu/drm/amd/display/dc/irq/dce110/irq_service_dce110.c +++ b/drivers/gpu/drm/amd/display/dc/irq/dce110/irq_service_dce110.c @@ -208,7 +208,7 @@ bool dce110_vblank_set(struct irq_service *irq_service, core_dc->current_state->res_ctx.pipe_ctx[pipe_offset].stream_res.tg; 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"); return false; }