Report success when loading a module that is built in the kernel.
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
goto error;
}
- ret = kmod_module_probe_insert_module(mod, KMOD_PROBE_IGNORE_LOADED,
+ ret = kmod_module_probe_insert_module(mod, 0,
NULL, NULL, NULL, NULL);
- if (ret < 0) {
+ if (ret == -EEXIST) {
+ DBG("Module %s is already loaded", modules[i].name);
+ ret = 0;
+ } else if (ret < 0) {
if (required) {
ERR("Unable to load required module %s",
modules[i].name);