]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
module: Simplify warning on positive returns from module_init()
authorLucas De Marchi <demarchi@kernel.org>
Mon, 30 Mar 2026 13:13:52 +0000 (08:13 -0500)
committerSami Tolvanen <samitolvanen@google.com>
Sat, 4 Apr 2026 00:04:48 +0000 (00:04 +0000)
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 <petr.pavlu@suse.com>
Signed-off-by: Lucas De Marchi <demarchi@kernel.org>
Reviewed-by: Aaron Tomlin <atomlin@atomlin.com>
Reviewed-by: Petr Pavlu <petr.pavlu@suse.com>
Reviewed-by: Daniel Gomez <da.gomez@samsung.com>
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
kernel/module/main.c

index ef67425367009d3d7d3358b349cac99f97297e85..46dd8d25a6058e5f7b38feaa80506e543763f133 100644 (file)
@@ -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;