]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdgpu/kfd: Add unlock() on error path to add_queue_mes()
authorDan Carpenter <dan.carpenter@linaro.org>
Thu, 20 Jun 2024 08:49:30 +0000 (11:49 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 27 Jun 2024 21:09:47 +0000 (17:09 -0400)
We recently added locking to add_queue_mes() but this error path was
overlooked.  Add an unlock to the error path.

Fixes: 1802b042a343 ("drm/amdgpu/kfd: remove is_hws_hang and is_resetting")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c

index d2fceb6f9802b31512b3039da94359a228c0ea48..4f48507418d2f1dac33227a06f63db83a20d96d4 100644 (file)
@@ -230,6 +230,7 @@ static int add_queue_mes(struct device_queue_manager *dqm, struct queue *q,
        if (queue_type < 0) {
                dev_err(adev->dev, "Queue type not supported with MES, queue:%d\n",
                        q->properties.type);
+               up_read(&adev->reset_domain->sem);
                return -EINVAL;
        }
        queue_input.queue_type = (uint32_t)queue_type;