diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 7e28f9870b861418e53a25e385dd6865deb914c4..74415fdf7ed864d91dbf5bb271191bd8e58a4860 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -395,9 +395,8 @@ void amdgpu_dm_fini(struct amdgpu_device *adev) adev->dm.freesync_module = NULL; } /* DC Destroy TODO: Replace destroy DAL */ - { + if (adev->dm.dc) dc_destroy(&adev->dm.dc); - } return; } @@ -490,7 +489,7 @@ static int dm_hw_fini(void *handle) amdgpu_dm_hpd_fini(adev); amdgpu_dm_irq_fini(adev); - + amdgpu_dm_fini(adev); return 0; } diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index 773f0efc449b9e82a318ac2dc50ab88d0135a624..b428c7c6559bb65eb3050a9d6084376d63f99241 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c @@ -1541,7 +1541,12 @@ enum dc_irq_source dc_interrupt_to_irq_source( void dc_interrupt_set(const struct dc *dc, enum dc_irq_source src, bool enable) { - struct core_dc *core_dc = DC_TO_CORE(dc); + struct core_dc *core_dc; + + if (dc == NULL) + return; + core_dc = DC_TO_CORE(dc); + dal_irq_service_set(core_dc->res_pool->irqs, src, enable); }