History

module: Simplify warning on positive returns from module_init()

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().

Lucas De Marchi committed 7 months ago

Commit 663385f1 parent 743f8ca1 file · +3 −7Browse files

Unified · Split

kernel/module/main.c+3−7
@@ -3115,13 +3115,9 @@ static noinline int do_init_module(struct module *mod) · 3114 unmodified lines
31153115
31163116 goto fail_free_freeinit;
31173117 }
3118− if (ret > 0) {
3119− pr_warn("%s: '%s'->init suspiciously returned %d, it should "
3120− "follow 0/-E convention\n"
3121− "%s: loading module anyway...\n",
3122− __func__, mod->name, ret, __func__);
3123− dump_stack();
3124− }
3118+ if (ret > 0)
3119+ pr_warn("%s: init suspiciously returned %d, it should follow 0/-E convention\n",
3120+ mod->name, ret);
31253121
31263122 /* Now it's a first class citizen! */
31273123 mod->state = MODULE_STATE_LIVE;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t