To resolve the warning regarding the missing error code 'r' in
amdgpu_userq_wait_ioctl(), assign the value 'r = -EINVAL'.

Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>
Closes: https://lore.kernel.org/r/[email protected]/
Cc: Alex Deucher <[email protected]>
Cc: Christian König <[email protected]>
Cc: Sunil Khatri <[email protected]>
Cc: Arunpravin Paneer Selvam <[email protected]>
Signed-off-by: Arvind Yadav <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
index 3288c2ff692e..84b052dbdd6b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
@@ -852,8 +852,10 @@ int amdgpu_userq_wait_ioctl(struct drm_device *dev, void 
*data,
                }
 
                waitq = idr_find(&userq_mgr->userq_idr, wait_info->waitq_id);
-               if (!waitq)
+               if (!waitq) {
+                       r = -EINVAL;
                        goto free_fences;
+               }
 
                for (i = 0, cnt = 0; i < num_fences; i++) {
                        struct amdgpu_userq_fence_driver *fence_drv;
-- 
2.34.1

Reply via email to