projects/linux·commit 663385f9

module: Simplify warning on positive returns from module_init()

663385f9 · Lucas De Marchi <[email protected]> · 2026-03-30 08:13:52 -05:00

It should now be rare to trigger this warning - it doesn't need to be so
verbose. Make it follow the usual style in the module loading code.

For the same reason, drop the dump_stack().

Suggested-by: Petr Pavlu <[email protected]>
Signed-off-by: Lucas De Marchi <[email protected]>
Reviewed-by: Aaron Tomlin <[email protected]>
Reviewed-by: Petr Pavlu <[email protected]>
Reviewed-by: Daniel Gomez <[email protected]>
Signed-off-by: Sami Tolvanen <[email protected]>
Commit
663385f9155f27892a97a5824006f806a32eb8dc
Parents
743f8cae

Changes

1 files changed · +3 −7

FileStatusAddDelContent
kernel/module/main.cmodified+3−7View file

kernel/module/main.c

View file
diff --git a/kernel/module/main.c b/kernel/module/main.c
index ef67425..46dd8d2 100644
--- a/kernel/module/main.c
+++ b/kernel/module/main.c
@@ -3115,13 +3115,9 @@ static noinline int do_init_module(struct module *mod)
goto fail_free_freeinit;
}
- if (ret > 0) {
- pr_warn("%s: '%s'->init suspiciously returned %d, it should "
- "follow 0/-E convention\n"
- "%s: loading module anyway...\n",
- __func__, mod->name, ret, __func__);
- dump_stack();
- }
+ if (ret > 0)
+ pr_warn("%s: init suspiciously returned %d, it should follow 0/-E convention\n",
+ mod->name, ret);
/* Now it's a first class citizen! */
mod->state = MODULE_STATE_LIVE;