Skip to content

Commit 4f3da95

Browse files
author
Kathryn Baldauf
authored
Merge pull request microsoft#2239 from katiewasnothere/kabaldau/check_exist_modules_dir
Remove kernel panic when kmod load fails
2 parents 0084749 + 327e535 commit 4f3da95

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

init/init.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -532,10 +532,7 @@ void load_all_modules() {
532532

533533
kmod_load_resources(k_ctx);
534534
ret = ftw(modules_dir, parse_tree_entry, OPEN_FDS);
535-
if (ret < 0) {
536-
kmod_unref(k_ctx);
537-
die("failed to load kmod resources");
538-
} else if (ret != 0) {
535+
if (ret != 0) {
539536
// Don't fail on error from walking the file tree and loading modules right now.
540537
// ftw may return an error if the modules directory doesn't exist, which
541538
// may be the case for some images. Additionally, we don't currently support

0 commit comments

Comments
 (0)