drm/amdkfd: Fix a memory leak in queue creation error handling

When the queue creation failed, some resources were not freed. Fix it.

Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Yong Zhao 2020-02-05 17:13:54 -05:00 committed by Alex Deucher
parent b42902f4af
commit 66f28b9a16

View File

@ -329,6 +329,9 @@ int pqm_create_queue(struct process_queue_manager *pqm,
return retval;
err_create_queue:
uninit_queue(q);
if (kq)
kernel_queue_uninit(kq, false);
kfree(pqn);
err_allocate_pqn:
/* check if queues list is empty unregister process from device */