diff options
authorSteven Rostedt <>2013-05-01 13:35:51 -0400
committerLinus Torvalds <>2013-05-01 10:44:24 -0700
commitbf5d770bd234a1e66322dd79c4ae5b397cd2b9c1 (patch)
parenta49fe6d59aae7f7835288df508b709ed2d69cbab (diff)
init: Do not warn on non-zero initcall return
Commit f91eb62f71b3 ("init: scream bloody murder if interrupts are enabled too early") added three new warnings. The first two seemed reasonable, but the third included a warning when an initcall returned non-zero. Although, the third WARN() does include an imbalanced preempt disabled, or irqs disable, it shouldn't warn if it only had an initcall that just returns non-zero. In fact, according to Linus, it shouldn't print at all. As it only prints with initcall_debug set, and that already shows enough information to fix things. Link: Suggested-by: Linus Torvalds <> Reported-by: Konrad Rzeszutek Wilk <> Signed-off-by: Steven Rostedt <> Signed-off-by: Linus Torvalds <>
1 files changed, 1 insertions, 4 deletions
diff --git a/init/main.c b/init/main.c
index bea1287aecdc..ceed17aaedfd 100644
--- a/init/main.c
+++ b/init/main.c
@@ -686,11 +686,8 @@ int __init_or_module do_one_initcall(initcall_t fn)
msgbuf[0] = 0;
- if (ret && ret != -ENODEV && initcall_debug)
- sprintf(msgbuf, "error code %d ", ret);
if (preempt_count() != count) {
- strlcat(msgbuf, "preemption imbalance ", sizeof(msgbuf));
+ sprintf(msgbuf, "preemption imbalance ");
preempt_count() = count;
if (irqs_disabled()) {