drivers/serial: Don't call uart_shutdown if the serial work as a console
since uart_setup is skip at line 556 for the console device Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
d5689e070b
commit
9cc608e4c4
@ -570,7 +570,11 @@ static int uart_open(FAR struct file *filep)
|
||||
ret = uart_attach(dev);
|
||||
if (ret < 0)
|
||||
{
|
||||
uart_shutdown(dev);
|
||||
if (!dev->isconsole)
|
||||
{
|
||||
uart_shutdown(dev);
|
||||
}
|
||||
|
||||
leave_critical_section(flags);
|
||||
goto errout_with_lock;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user