esp32_serial.c: Release the spinlock before calling uart_xmitchars, this

functions will call esp32_txint again which leads to deadlock since
esp32_txint has already locked the spinlock.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
This commit is contained in:
Abdelatif Guettouche 2021-08-24 16:57:36 +02:00 committed by Masayuki Ishikawa
parent b5bb1fb8a3
commit 4ef859924b
1 changed files with 1 additions and 0 deletions

View File

@ -1733,6 +1733,7 @@ static void esp32_txint(struct uart_dev_s *dev, bool enable)
* interrupts disabled (note this may recurse). * interrupts disabled (note this may recurse).
*/ */
spin_unlock_irqrestore(&priv->lock, flags);
uart_xmitchars(dev); uart_xmitchars(dev);
#endif #endif
} }