mirror of
https://github.com/apache/nuttx.git
synced 2026-05-18 08:54:05 +08:00
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:
committed by
Petro Karashchenko
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user