[PATCH v2 14/23] plugins/amdgpu: Do not eat the errno in kmtIoctl

Tvrtko Ursulin <[email protected]> Fri, 10 Apr 2026 19:55:05 +0100
Newsgroups dev.linux.lists.criu
Message-ID <[email protected]>
Error logging for just a single error condition will eat the errno so lets
just remove it. All callers use pr_perror() and rely on the helper not
munching it up so no information is lost by removing the internal log.

Signed-off-by: Tvrtko Ursulin <[email protected]>
Reviewed-By: David Francis <[email protected]>
---
 plugins/amdgpu/amdgpu_plugin.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/plugins/amdgpu/amdgpu_plugin.c b/plugins/amdgpu/amdgpu_plugin.c
index b1c063a857da..2f63dcfa30a9 100644
--- a/plugins/amdgpu/amdgpu_plugin.c
+++ b/plugins/amdgpu/amdgpu_plugin.c
@@ -102,11 +102,6 @@ int kmtIoctl(int fd, unsigned long request, void *arg)
 		ret = ioctl(fd, request, arg);
 	} while (ret == -1 && max_retries-- > 0 && (errno == EINTR || errno == EAGAIN));
 
-	if (ret == -1 && errno == EBADF)
-		/* In case pthread_atfork didn't catch it, this will
-		 * make any subsequent hsaKmt calls fail in CHECK_KFD_OPEN.
-		 */
-		pr_perror("KFD file descriptor not valid in this process");
 	return ret;
 }
 
-- 
2.52.0