We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e37577e commit 0e53e2dCopy full SHA for 0e53e2d
kernel/printk/printk.c
@@ -3771,11 +3771,16 @@ static int unregister_console_locked(struct console *console)
3771
if (res > 0)
3772
return 0;
3773
3774
+ if (!console_is_registered_locked(console))
3775
+ res = -ENODEV;
3776
+ else if (console_is_usable(console, console->flags))
3777
+ __pr_flush(console, 1000, true);
3778
+
3779
/* Disable it unconditionally */
3780
console_srcu_write_flags(console, console->flags & ~CON_ENABLED);
3781
- if (!console_is_registered_locked(console))
- return -ENODEV;
3782
+ if (res < 0)
3783
+ return res;
3784
3785
/*
3786
* Use the driver synchronization to ensure that the hardware is not
0 commit comments