diff --git a/sys/dev/uart/uart_subr.c b/sys/dev/uart/uart_subr.c --- a/sys/dev/uart/uart_subr.c +++ b/sys/dev/uart/uart_subr.c @@ -200,13 +200,6 @@ bus_addr_t addr = ~0U; int error; - /* - * All uart_class references are weak. Make sure the default - * device class has been compiled-in. - */ - if (class == NULL) - return (ENXIO); - /* * Check the environment variables "hw.uart.console" and * "hw.uart.dbgport". These variables, when present, specify @@ -292,6 +285,13 @@ spec++; } + /* + * All uart_class references are weak. Make sure the default + * device class has been compiled-in. + */ + if (class == NULL) + return (ENXIO); + /* * If we still have an invalid address, the specification must be * missing an I/O port or memory address. We don't like that.