Skip to content

Commit fea8f13

Browse files
Sundance636alexdeucher
authored andcommitted
drm/amdkfd: Fix Unchecked Return Value
Properly check the return values for function, as done elsewhere. Signed-off-by: Sunday Clement <Sunday.Clement@amd.com> Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent f44aad3 commit fea8f13

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1897,16 +1897,19 @@ static int start_cpsch(struct device_queue_manager *dqm)
18971897

18981898
static int stop_cpsch(struct device_queue_manager *dqm)
18991899
{
1900+
int ret = 0;
1901+
19001902
dqm_lock(dqm);
19011903
if (!dqm->sched_running) {
19021904
dqm_unlock(dqm);
19031905
return 0;
19041906
}
19051907

19061908
if (!dqm->dev->kfd->shared_resources.enable_mes)
1907-
unmap_queues_cpsch(dqm, KFD_UNMAP_QUEUES_FILTER_ALL_QUEUES, 0, USE_DEFAULT_GRACE_PERIOD, false);
1909+
ret = unmap_queues_cpsch(dqm, KFD_UNMAP_QUEUES_FILTER_ALL_QUEUES,
1910+
0, USE_DEFAULT_GRACE_PERIOD, false);
19081911
else
1909-
remove_all_kfd_queues_mes(dqm);
1912+
ret = remove_all_kfd_queues_mes(dqm);
19101913

19111914
dqm->sched_running = false;
19121915

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

1923-
return 0;
1926+
return ret;
19241927
}
19251928

19261929
static int create_kernel_queue_cpsch(struct device_queue_manager *dqm,

0 commit comments

Comments
 (0)