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
@@ -569,8 +569,12 @@ static int uart_open(FAR struct file *filep)
ret = uart_attach(dev);
if (ret < 0)
+ {
+ if (!dev->isconsole)
{
uart_shutdown(dev);
+ }
+
leave_critical_section(flags);
goto errout_with_lock;
}
