devuart: don't sleep in uartdrainoutput() when called splhi or without a process
uartdrainoutput() might be called in early initialization from uartctl() without a process.
This commit is contained in:
parent
d81f4d4866
commit
2ee4c08974
1 changed files with 1 additions and 2 deletions
|
@ -318,9 +318,8 @@ uartdrained(void* arg)
|
|||
static void
|
||||
uartdrainoutput(Uart *p)
|
||||
{
|
||||
if(!p->enabled)
|
||||
if(!p->enabled || up == nil || !islo())
|
||||
return;
|
||||
|
||||
p->drain = 1;
|
||||
if(waserror()){
|
||||
p->drain = 0;
|
||||
|
|
Loading…
Reference in a new issue