diff options
author | Oded Gabbay <oded.gabbay@amd.com> | 2015-01-22 11:40:06 +0200 |
---|---|---|
committer | Oded Gabbay <oded.gabbay@amd.com> | 2015-01-22 12:43:42 +0200 |
commit | 7113cd652969fe1a59a9560e700000633df6a3e1 (patch) | |
tree | 492f1e552eba19ef7f1faa614f2e97ec389d4a39 /drivers/gpu | |
parent | 300dec9578f77111d5fe0c236681b9e25a00cee7 (diff) |
drm/amdkfd: Handle case of invalid queue type
This patch handles a case where amdkfd tries to destroy a queue but the queue
type is invalid.
This case occurs in non-HWS path.
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c index 85387c8b296c..99e2dbbb4862 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c @@ -301,6 +301,11 @@ static int destroy_queue_nocpsch(struct device_queue_manager *dqm, } dqm->sdma_queue_count--; deallocate_sdma_queue(dqm, q->sdma_id); + } else { + pr_debug("q->properties.type is invalid (%d)\n", + q->properties.type); + retval = -EINVAL; + goto out; } retval = mqd->destroy_mqd(mqd, q->mqd, |