提交 e048a0b2 编写于 作者: D Dan Carpenter 提交者: Oded Gabbay

amdkfd: fix an error handling bug in pqm_create_queue()

The call to kernel_queue_uninit(NULL) will trigger a BUG(), and also the
error code is incorrect.

Fixes: 45102048 ('amdkfd: Add process queue manager module')
Reviewed-by: NOded Gabbay <oded.gabbay@amd.com>
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NOded Gabbay <oded.gabbay@amd.com>
上级 66333cb3
...@@ -208,7 +208,7 @@ int pqm_create_queue(struct process_queue_manager *pqm, ...@@ -208,7 +208,7 @@ int pqm_create_queue(struct process_queue_manager *pqm,
case KFD_QUEUE_TYPE_DIQ: case KFD_QUEUE_TYPE_DIQ:
kq = kernel_queue_init(dev, KFD_QUEUE_TYPE_DIQ); kq = kernel_queue_init(dev, KFD_QUEUE_TYPE_DIQ);
if (kq == NULL) { if (kq == NULL) {
kernel_queue_uninit(kq); retval = -ENOMEM;
goto err_create_queue; goto err_create_queue;
} }
kq->queue->properties.queue_id = *qid; kq->queue->properties.queue_id = *qid;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册