drm/xe: Add a missing mutex_destroy to xe_ttm_vram_mgr
authorBommithi Sakeena <bommithi.sakeena@intel.com>
Wed, 27 Sep 2023 16:50:12 +0000 (16:50 +0000)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 21 Dec 2023 16:41:21 +0000 (11:41 -0500)
Ensure that the mutex is destroyed at fini function.

Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Bommithi Sakeena <bommithi.sakeena@intel.com>
Reviewed-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_ttm_vram_mgr.c

index 06a54c8bd46f1abe9f39421a9db8e075169d5a3b..285791eb4a796fe4a29c76470bce13385ddc7962 100644 (file)
@@ -328,6 +328,8 @@ static void ttm_vram_mgr_fini(struct drm_device *dev, void *arg)
        ttm_resource_manager_cleanup(&mgr->manager);
 
        ttm_set_driver_manager(&xe->ttm, mgr->mem_type, NULL);
+
+       mutex_destroy(&mgr->lock);
 }
 
 int __xe_ttm_vram_mgr_init(struct xe_device *xe, struct xe_ttm_vram_mgr *mgr,