- struct kmod_list *list = NULL;
- struct kmod_list *listb = NULL;
- struct kmod_list *l;
- int err;
-
- err = kmod_module_new_from_lookup(ctx, alias, &list);
- if (err < 0)
- return err;
-
- err = kmod_module_get_filtered_blacklist(ctx, list, &listb);
- if (err < 0)
- return err;
-
- if (list == NULL)
- info(udev, "no module matches '%s'\n", alias);
-
- kmod_list_foreach(l, listb) {
- struct kmod_module *mod = kmod_module_get_module(l);
-
- err = kmod_module_probe_insert_module(mod, 0, NULL, NULL, NULL);
- if (err >=0 )
- info(udev, "inserted '%s'\n", kmod_module_get_name(mod));
- else
- info(udev, "failed to insert '%s'\n", kmod_module_get_name(mod));
-
- kmod_module_unref(mod);
- }
-
- kmod_module_unref_list(list);
- kmod_module_unref_list(listb);
- return err;
+ struct kmod_list *list = NULL;
+ struct kmod_list *listb = NULL;
+ struct kmod_list *l;
+ int err;
+
+ err = kmod_module_new_from_lookup(ctx, alias, &list);
+ if (err < 0)
+ return err;
+
+ err = kmod_module_get_filtered_blacklist(ctx, list, &listb);
+ if (err < 0)
+ return err;
+
+ if (list == NULL)
+ info(udev, "no module matches '%s'\n", alias);
+ else if (listb == NULL)
+ info(udev, "modules matching '%s' are blacklisted\n", alias);
+
+ kmod_list_foreach(l, listb) {
+ struct kmod_module *mod = kmod_module_get_module(l);
+
+ err = kmod_module_probe_insert_module(mod, 0, NULL, NULL, NULL);
+ if (err >=0 )
+ info(udev, "inserted '%s'\n", kmod_module_get_name(mod));
+ else
+ info(udev, "failed to insert '%s'\n", kmod_module_get_name(mod));
+
+ kmod_module_unref(mod);
+ }
+
+ kmod_module_unref_list(list);
+ kmod_module_unref_list(listb);
+ return err;