Skip to contentSkip to conversation

drm/amdgpu: Fix amdgpu_userq_wait_ioctl() warn missing error code 'r'

PATCH In review Arvind Yadav 2 participants 2 messages May 8, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: Fix amdgpu_userq_wait_ioctl() warn missing error code 'r'

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

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c +3 -1
index 3288c2ff692e..84b052dbdd6b 100644
@@ -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;
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

-----Original Message-----
From: Yadav, Arvind <[email protected]>
Sent: Thursday, May 8, 2025 11:50 AM
To: Koenig, Christian <[email protected]>; Deucher, Alexander <[email protected]>; Khatri, Sunil <[email protected]>; Paneer Selvam, Arunpravin <[email protected]>; [email protected]
Cc: [email protected]; Yadav, Arvind <[email protected]>; kernel test robot <[email protected]>; Koenig, Christian <[email protected]>
Subject: [PATCH] drm/amdgpu: Fix amdgpu_userq_wait_ioctl() warn missing error code 'r'

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

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c +3 -1
index 3288c2ff692e..84b052dbdd6b 100644
@@ -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