mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-28 05:12:49 +00:00
usb: early: xhci-dbc: use console_is_registered()
It is not reliable to check for CON_ENABLED in order to identify if a console is registered. Use console_is_registered() instead. Signed-off-by: John Ogness <john.ogness@linutronix.de> Reviewed-by: Petr Mladek <pmladek@suse.com> Signed-off-by: Petr Mladek <pmladek@suse.com> Link: https://lore.kernel.org/r/20221116162152.193147-31-john.ogness@linutronix.de
This commit is contained in:
parent
4b71a443cb
commit
9490b22ab3
1 changed files with 1 additions and 1 deletions
|
@ -927,7 +927,7 @@ void __init early_xdbc_register_console(void)
|
|||
|
||||
static void xdbc_unregister_console(void)
|
||||
{
|
||||
if (early_xdbc_console.flags & CON_ENABLED)
|
||||
if (console_is_registered(&early_xdbc_console))
|
||||
unregister_console(&early_xdbc_console);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue