Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107365143
D47078.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
849 B
Referenced Files
None
Subscribers
None
D47078.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D47078: uart: uart_getenv: check for NULL class last, not first
Attached
Detach File
Event Timeline
Log In to Comment