From: Anthony Koo <Anthony.Koo@xxxxxxx> Change-Id: I1542e96e23c2b2b943c09d2099d2fd5426cb0868 Signed-off-by: Anthony Koo <anthony.koo at amd.com> Reviewed-by: Aric Cyr <Aric.Cyr at amd.com> Acked-by: Harry Wentland <Harry.Wentland at amd.com> --- drivers/gpu/drm/amd/display/modules/color/color.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/modules/color/color.c b/drivers/gpu/drm/amd/display/modules/color/color.c index 938867282d04..6d1b20f6bf98 100644 --- a/drivers/gpu/drm/amd/display/modules/color/color.c +++ b/drivers/gpu/drm/amd/display/modules/color/color.c @@ -1748,8 +1748,10 @@ bool mod_color_remove_sink(struct mod_color *mod_color, for (i = 0; i < core_color->num_sinks; i++) { if (core_color->caps[i].sink == sink) { - if (core_color->state[i].gamma) + if (core_color->state[i].gamma) { dc_gamma_release(core_color->state[i].gamma); + core_color->state[i].gamma = NULL; + } /* To remove this sink, shift everything after down */ for (j = i; j < core_color->num_sinks - 1; j++) { -- 2.9.3