Page MenuHomeFreeBSD

D47078.diff
No OneTemporary

D47078.diff

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
@@ -300,6 +293,13 @@
goto inval;
freeenv(cp);
+ /*
+ * The default uart_class reference is weak. Make sure the default
+ * device class has been compiled-in or we've set one with dt=.
+ */
+ if (class == NULL)
+ return (ENXIO);
+
/*
* Accept only the well-known baudrates. Any invalid baudrate
* is silently replaced with a 0-valued baudrate. The 0 baudrate

File Metadata

Mime Type
text/plain
Expires
Tue, Jan 14, 2:40 AM (21 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15790246
Default Alt Text
D47078.diff (849 B)

Event Timeline