The return code of a non void function should not be ignored. In cases
where we do not care, the code needs to suppress it.

Signed-off-by: Andrew Martin <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 8 +++-----
 drivers/gpu/drm/amd/amdkfd/kfd_chardev.c   | 5 ++++-
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
index 644f79f3c9af..e1b208aa72c8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
@@ -313,8 +313,7 @@ int amdgpu_amdkfd_post_reset(struct amdgpu_device *adev)
 void amdgpu_amdkfd_gpu_reset(struct amdgpu_device *adev)
 {
        if (amdgpu_device_should_recover_gpu(adev))
-               amdgpu_reset_domain_schedule(adev->reset_domain,
-                                            &adev->kfd.reset_work);
+               (void)amdgpu_reset_domain_schedule(adev->reset_domain, 
&adev->kfd.reset_work);
 }
 
 int amdgpu_amdkfd_alloc_gtt_mem(struct amdgpu_device *adev, size_t size,
@@ -715,9 +714,8 @@ void amdgpu_amdkfd_set_compute_idle(struct amdgpu_device 
*adev, bool idle)
                if (gfx_block != NULL)
                        gfx_block->version->funcs->set_powergating_state((void 
*)gfx_block, state);
        }
-       amdgpu_dpm_switch_power_profile(adev,
-                                       PP_SMC_POWER_PROFILE_COMPUTE,
-                                       !idle);
+       (void)amdgpu_dpm_switch_power_profile(adev, 
PP_SMC_POWER_PROFILE_COMPUTE, !idle);
+
 }
 
 bool amdgpu_amdkfd_is_kfd_vmid(struct amdgpu_device *adev, u32 vmid)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c 
b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
index 22925df6a791..81a3e0aa40a9 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
@@ -2780,7 +2780,10 @@ static int runtime_enable(struct kfd_process *p, 
uint64_t r_debug,
                 * saved in MES.
                 */
                if (pdd->dev->kfd->shared_resources.enable_mes)
-                       kfd_dbg_set_mes_debug_mode(pdd, 
!kfd_dbg_has_cwsr_workaround(pdd->dev));
+                       ret = kfd_dbg_set_mes_debug_mode(
+                               pdd, !kfd_dbg_has_cwsr_workaround(pdd->dev));
+               if (ret)
+                       return ret;
        }
 
        p->runtime_info.runtime_state = DEBUG_RUNTIME_STATE_ENABLED;
-- 
2.43.0

Reply via email to