Skip to content

Commit 9490b22

Browse files
jognesspmladek
authored andcommitted
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
1 parent 4b71a44 commit 9490b22

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/usb/early/xhci-dbc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,7 @@ void __init early_xdbc_register_console(void)
927927

928928
static void xdbc_unregister_console(void)
929929
{
930-
if (early_xdbc_console.flags & CON_ENABLED)
930+
if (console_is_registered(&early_xdbc_console))
931931
unregister_console(&early_xdbc_console);
932932
}
933933

0 commit comments

Comments
 (0)