drivers: serial: Fix a wrong variable in serial.c in SMP mode.

This commit is contained in:
Masayuki Ishikawa
2020-01-11 00:10:12 +09:00
committed by patacongo
parent 275f4baf9f
commit 784408e617
+2 -2
View File
@@ -210,7 +210,7 @@ static int uart_putxmitchar(FAR uart_dev_t *dev, int ch, bool oktoblock)
int ret;
#ifdef CONFIG_SMP
flags = enter_critical_section();
irqstate_t flags2 = enter_critical_section();
#endif
/* Increment to see what the next head pointer will be. We need to use the "next"
@@ -347,7 +347,7 @@ static int uart_putxmitchar(FAR uart_dev_t *dev, int ch, bool oktoblock)
err_out:
#ifdef CONFIG_SMP
leave_critical_section(flags);
leave_critical_section(flags2);
#endif
return ret;