diff options
author | Oded Gabbay <oded.gabbay@amd.com> | 2015-01-20 07:57:19 -0500 |
---|---|---|
committer | Oded Gabbay <oded.gabbay@amd.com> | 2015-02-02 02:45:24 -0500 |
commit | b9dce23ddc949faa8ba138f8a0811e177c991bf1 (patch) | |
tree | 4124f379d5b92328bb84320d34cc12450803191f | |
parent | ca400b2a1a6c768416725e5f873829e23300d3eb (diff) |
drm/amdkfd: Don't create BUG due to incorrect user parameter
This patch changes a BUG_ON() statement to pr_debug, in case the user tries to
update a non-existing queue.
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
Reviewed-by: Ben Goz <ben.goz@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c index f37cf5efe642..2fda1927bff7 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | |||
@@ -315,7 +315,11 @@ int pqm_update_queue(struct process_queue_manager *pqm, unsigned int qid, | |||
315 | BUG_ON(!pqm); | 315 | BUG_ON(!pqm); |
316 | 316 | ||
317 | pqn = get_queue_by_qid(pqm, qid); | 317 | pqn = get_queue_by_qid(pqm, qid); |
318 | BUG_ON(!pqn); | 318 | if (!pqn) { |
319 | pr_debug("amdkfd: No queue %d exists for update operation\n", | ||
320 | qid); | ||
321 | return -EFAULT; | ||
322 | } | ||
319 | 323 | ||
320 | pqn->q->properties.queue_address = p->queue_address; | 324 | pqn->q->properties.queue_address = p->queue_address; |
321 | pqn->q->properties.queue_size = p->queue_size; | 325 | pqn->q->properties.queue_size = p->queue_size; |