Commit fea8f13f authored by Sunday Clement's avatar Sunday Clement Committed by Alex Deucher
Browse files

drm/amdkfd: Fix Unchecked Return Value



Properly check the return values for function, as done elsewhere.

Signed-off-by: default avatarSunday Clement <Sunday.Clement@amd.com>

Reviewed-by: default avatarHarish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent f44aad39
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -1897,6 +1897,8 @@ static int start_cpsch(struct device_queue_manager *dqm)

static int stop_cpsch(struct device_queue_manager *dqm)
{
	int ret = 0;

	dqm_lock(dqm);
	if (!dqm->sched_running) {
		dqm_unlock(dqm);
@@ -1904,9 +1906,10 @@ static int stop_cpsch(struct device_queue_manager *dqm)
	}

	if (!dqm->dev->kfd->shared_resources.enable_mes)
		unmap_queues_cpsch(dqm, KFD_UNMAP_QUEUES_FILTER_ALL_QUEUES, 0, USE_DEFAULT_GRACE_PERIOD, false);
		ret = unmap_queues_cpsch(dqm, KFD_UNMAP_QUEUES_FILTER_ALL_QUEUES,
								0, USE_DEFAULT_GRACE_PERIOD, false);
	else
		remove_all_kfd_queues_mes(dqm);
		ret = remove_all_kfd_queues_mes(dqm);

	dqm->sched_running = false;

@@ -1920,7 +1923,7 @@ static int stop_cpsch(struct device_queue_manager *dqm)
	dqm->detect_hang_info = NULL;
	dqm_unlock(dqm);

	return 0;
	return ret;
}

static int create_kernel_queue_cpsch(struct device_queue_manager *dqm,