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 <[email protected]> Reviewed-by: Petr Mladek <[email protected]> Signed-off-by: Petr Mladek <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 4b71a44 commit 9490b22

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)