From: Michal Wajdeczko Date: Thu, 31 Jul 2025 19:33:31 +0000 (+0200) Subject: drm/xe/configfs: Destroy xe_configfs.su_mutex on exit/error X-Git-Tag: v6.18-rc1~134^2~18^2~105 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b90613fb02179a01c6042d8a952e2c68e81d3cf7;p=thirdparty%2Flinux.git drm/xe/configfs: Destroy xe_configfs.su_mutex on exit/error While mutex_destroy() is NOP when CONFIG_DEBUG_MUTEXES is not enabled, we should still call it. While around, drop a trailing line. Signed-off-by: Michal Wajdeczko Reviewed-by: Rodrigo Vivi Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20250731193339.179829-4-michal.wajdeczko@intel.com Signed-off-by: Lucas De Marchi --- diff --git a/drivers/gpu/drm/xe/xe_configfs.c b/drivers/gpu/drm/xe/xe_configfs.c index 36e2b45b305f4..56fbf4c1c37f0 100644 --- a/drivers/gpu/drm/xe/xe_configfs.c +++ b/drivers/gpu/drm/xe/xe_configfs.c @@ -401,6 +401,7 @@ int __init xe_configfs_init(void) if (ret) { pr_err("Error %d while registering %s subsystem\n", ret, root->cg_item.ci_namebuf); + mutex_destroy(&xe_configfs.su_mutex); return ret; } @@ -410,5 +411,5 @@ int __init xe_configfs_init(void) void __exit xe_configfs_exit(void) { configfs_unregister_subsystem(&xe_configfs); + mutex_destroy(&xe_configfs.su_mutex); } -