diff options
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/core/dc_surface.c')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_surface.c b/drivers/gpu/drm/amd/display/dc/core/dc_surface.c index 3ec1f36..cf8fb9a 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_surface.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_surface.c @@ -71,11 +71,15 @@ static bool construct(struct dc_context *ctx, struct surface *surface) static void destruct(struct surface *surface) { - if (surface->protected.public.gamma_correction != NULL) + if (surface->protected.public.gamma_correction != NULL) { dc_gamma_release(surface->protected.public.gamma_correction); - if (surface->protected.public.in_transfer_func != NULL) + surface->protected.public.gamma_correction = NULL; + } + if (surface->protected.public.in_transfer_func != NULL) { dc_transfer_func_release( surface->protected.public.in_transfer_func); + surface->protected.public.in_transfer_func = NULL; + } } /******************************************************************************* |