[PATCH 3/5] drm/amd/display: Only free dm private atomic_obj if initialized
Mario Limonciello
mario.limonciello at amd.com
Fri Nov 15 06:09:22 UTC 2024
If DM init fails early then the dm private atomic_obj would not
have gotten setup. Check for this problem.
Signed-off-by: Mario Limonciello <mario.limonciello at amd.com>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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 5fd3d36964369..3081418fc255a 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -5181,7 +5181,8 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
static void amdgpu_dm_destroy_drm_device(struct amdgpu_display_manager *dm)
{
- drm_atomic_private_obj_fini(&dm->atomic_obj);
+ if (dm->atomic_obj.funcs)
+ drm_atomic_private_obj_fini(&dm->atomic_obj);
}
/******************************************************************************
--
2.43.0
More information about the amd-gfx
mailing list