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
|
@ -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 New Issue