Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7113cd65 authored by Oded Gabbay's avatar Oded Gabbay
Browse files

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: default avatarOded Gabbay <oded.gabbay@amd.com>
Reviewed-by: default avatarJammy Zhou <Jammy.Zhou@amd.com>
parent 300dec95
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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,