summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2004-03-20 08:38:33 +0000
committermarcel <marcel@FreeBSD.org>2004-03-20 08:38:33 +0000
commit4dcb876bb2ad0fe90d0c72907d7694fee5ebeca5 (patch)
tree1b7fe73c6b7d48fee8af742fc0b452bdc4333272 /sys/dev
parent55f1dd7399d8d3f2e32a4d9db7add77e9900e64a (diff)
downloadFreeBSD-src-4dcb876bb2ad0fe90d0c72907d7694fee5ebeca5.zip
FreeBSD-src-4dcb876bb2ad0fe90d0c72907d7694fee5ebeca5.tar.gz
Fix braino in previous commit: getenv() can return NULL.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/uart/uart_subr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/uart/uart_subr.c b/sys/dev/uart/uart_subr.c
index 9a3cb85..4c40a36 100644
--- a/sys/dev/uart/uart_subr.c
+++ b/sys/dev/uart/uart_subr.c
@@ -177,6 +177,8 @@ uart_getenv(int devtype, struct uart_devinfo *di)
else if (devtype == UART_DEV_DBGPORT)
spec = getenv("hw.uart.dbgport");
else
+ spec = NULL;
+ if (spec == NULL)
return (ENXIO);
/* Set defaults. */
OpenPOWER on IntegriCloud