drm/amdgpu: Fix missing unlocking in an error path in amdgpu_userq_create()

If kasprintf() fails, some mutex still need to be released to avoid locking
issue, as already done in all other error handling path.

Fixes: c03ea34cbf ("drm/amdgpu: add support of debugfs for mqd information")
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/all/366557fa7ca8173fd78c58336986ca56953369b9.1752087753.git.christophe.jaillet@wanadoo.fr/
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Christophe JAILLET 2025-07-09 21:02:51 +02:00 committed by Alex Deucher
parent 41ab92d35c
commit 28c5c48638

View File

@ -521,8 +521,10 @@ amdgpu_userq_create(struct drm_file *filp, union drm_amdgpu_userq *args)
}
queue_name = kasprintf(GFP_KERNEL, "queue-%d", qid);
if (!queue_name)
return -ENOMEM;
if (!queue_name) {
r = -ENOMEM;
goto unlock;
}
#if defined(CONFIG_DEBUG_FS)
/* Queue dentry per client to hold MQD information */