diff options
-rw-r--r-- | lib/igt_kmod.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index 4f70e30d..f3f34a62 100644 --- a/lib/igt_kmod.c +++ b/lib/igt_kmod.c @@ -141,7 +141,13 @@ out: static int modprobe(struct kmod_module *kmod, const char *options) { - return kmod_module_probe_insert_module(kmod, 0, options, + unsigned int flags; + + flags = 0; + if (options) /* force a fresh load to set the new options */ + flags |= KMOD_PROBE_FAIL_ON_LOADED; + + return kmod_module_probe_insert_module(kmod, flags, options, NULL, NULL, NULL); } |