Skip to content

Commit

Permalink
drm/amdkfd: Handle case of invalid queue type
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Oded Gabbay committed Jan 22, 2015
1 parent 300dec9 commit 7113cd6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7113cd6

Please sign in to comment.