30 lines
864 B
Diff
30 lines
864 B
Diff
diff --git a/tools/kmod-modinfo.c b/tools/kmod-modinfo.c
|
|
index b6af26f..8506193 100644
|
|
--- a/tools/kmod-modinfo.c
|
|
+++ b/tools/kmod-modinfo.c
|
|
@@ -279,6 +279,12 @@ static int modinfo_alias_do(struct kmod_ctx *ctx, const char *alias)
|
|
LOG("Module alias %s not found.\n", alias);
|
|
return err;
|
|
}
|
|
+
|
|
+ if (list == NULL) {
|
|
+ LOG("Module %s not found.\n", alias);
|
|
+ return -ENOENT;
|
|
+ }
|
|
+
|
|
kmod_list_foreach(l, list) {
|
|
struct kmod_module *mod = kmod_module_get_module(l);
|
|
int r = modinfo_do(mod);
|
|
diff --git a/tools/kmod-modprobe.c b/tools/kmod-modprobe.c
|
|
index 8286b9b..6ca94f2 100644
|
|
--- a/tools/kmod-modprobe.c
|
|
+++ b/tools/kmod-modprobe.c
|
|
@@ -856,7 +856,7 @@ static int insmod_alias(struct kmod_ctx *ctx, const char *alias, const char *ext
|
|
|
|
if (list == NULL) {
|
|
LOG("Module %s not found.\n", alias);
|
|
- return err;
|
|
+ return -ENOENT;
|
|
}
|
|
|
|
if (use_blacklist) {
|