[PATCH i-g-t 1/2] lib/igt_kmod: fix check to confirm correct driver unload

Daniele Ceraolo Spurio daniele.ceraolospurio at intel.com
Wed Dec 18 23:38:29 UTC 2024


The driver variable is a string, so we need to pass it in as a variable
for the driver name instead of stringifying it.

Fixes: e5edf7ea7 ("lib/igt_kmod: add support for Xe driver")
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
Cc: Mauro Carvalho Chehab <mchehab at kernel.org>
Cc: Kamil Konieczny <kamil.konieczny at linux.intel.com>
---
 lib/igt_kmod.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c
index d58867d7e..a8b0339b9 100644
--- a/lib/igt_kmod.c
+++ b/lib/igt_kmod.c
@@ -731,7 +731,7 @@ igt_intel_driver_unload(const char *driver)
 	igt_kmod_unload("drm_kms_helper");
 	igt_kmod_unload("drm");
 
-	if (igt_kmod_is_loaded("driver")) {
+	if (igt_kmod_is_loaded(driver)) {
 		igt_warn("%s.ko still loaded!\n", driver);
 		return -EBUSY;
 	}
-- 
2.43.0



More information about the igt-dev mailing list