diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c index b8b6c0c63d..2fdf369448 100644 --- a/sys/kern/kern_linker.c +++ b/sys/kern/kern_linker.c @@ -447,8 +447,11 @@ linker_load_file(const char *filename, linker_file_t *result) * If we got something other than ENOENT, then it exists but * we cannot load it for some other reason. */ - if (error != ENOENT) + if (error != ENOENT) { foundfile = 1; + if (error == EEXIST) + break; + } if (lf) { error = linker_file_register_modules(lf); if (error == EEXIST) {