[PATCH v5 03/11] drm/xe/configfs: Destroy xe_configfs.su_mutex on exit/error

Lucas De Marchi lucas.demarchi at intel.com
Tue Aug 5 12:49:15 UTC 2025


On Tue, Jul 29, 2025 at 01:42:07PM +0200, Michal Wajdeczko wrote:
>While mutex_destroy() is NOP when CONFIG_DEBUG_MUTEXES is not
>enabled, we should still call it.
>
>While around, drop a traling line.

s/traling/trailing/, which can be fixed while merging.


>
>Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
>Cc: Lucas De Marchi <lucas.demarchi at intel.com>
>Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>


Reviewed-by: Lucas De Marchi <lucas.demarchi at intel.com>

thanks
Lucas De Marchi

>---
>v2: remove pr_err in separate patch (Rodrigo)
>---
> drivers/gpu/drm/xe/xe_configfs.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/gpu/drm/xe/xe_configfs.c b/drivers/gpu/drm/xe/xe_configfs.c
>index 36e2b45b305f..56fbf4c1c37f 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);
> }
>-
>-- 
>2.47.1
>


More information about the Intel-xe mailing list