Fix braino in previous commit: getenv() can return NULL.
This commit is contained in:
parent
1e709c9cb5
commit
139a40ebfe
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user