[i-g-t, v2, 1/3] lib/igt_kmod: fix check to confirm correct driver unload

Kamil Konieczny kamil.konieczny at linux.intel.com
Fri Dec 20 18:02:32 UTC 2024


On 2024-12-19 at 15:05:15 -0800, Daniele Ceraolo Spurio wrote:
> 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>
> Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
> Reviewed-by: Lucas De Marchi <lucas.demarchi at intel.com>

Could it be merged first as an abvious fix?

Regards,
Kamil

> ---
>  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 ed283c14b..d73cb4101 100644
> --- a/lib/igt_kmod.c
> +++ b/lib/igt_kmod.c
> @@ -723,7 +723,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;
>  	}


More information about the igt-dev mailing list