[PATCH i-g-t v3 2/3] lib/igt_kmod: Drop errno checking from igt_kmod_unbind

Daniele Ceraolo Spurio daniele.ceraolospurio at intel.com
Fri Dec 20 19:04:39 UTC 2024


Other checks already cover the special cases, so there is no need to
check errno directly. This fixes an issue where errno is already set
before entering the functions and triggers the assert.

Fixes: cb008246b0c7 ("lib/igt_kmod: Rewrite xe unload logic")
Suggested-by: Lucas De Marchi <lucas.demarchi at intel.com>
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
Cc: Lucas De Marchi <lucas.demarchi at intel.com>
---
 lib/igt_kmod.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c
index d73cb4101..95c5b79cc 100644
--- a/lib/igt_kmod.c
+++ b/lib/igt_kmod.c
@@ -686,11 +686,8 @@ int igt_kmod_unbind(const char *mod_name)
 		igt_assert(ret);
 
 		close(devfd);
-		errno = 0;
 	}
 
-	igt_assert_eq(errno, 0);
-
 	return 0;
 }
 
-- 
2.43.0



More information about the igt-dev mailing list