serial: stm32: remove infinite loop possibility in putchar function
authorValentin Caron <valentin.caron@foss.st.com>
Tue, 19 Apr 2022 08:53:28 +0000 (10:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 22 Apr 2022 14:36:23 +0000 (16:36 +0200)
commit28fb1a92a00706d4e008ab24fbd8e4642df46ca5
tree323c8bd551a8aa70adf5a7ecfb0a6d5a4faae4d5
parentec66b8cf03e5a63de6332c989b0ceebe4ba2937e
serial: stm32: remove infinite loop possibility in putchar function

Rework stm32_usart_console_putchar() function in order to anticipate
the case where the character can never be sent.

Signed-off-by: Valentin Caron <valentin.caron@foss.st.com>
Link: https://lore.kernel.org/r/20220419085330.1178925-2-valentin.caron@foss.st.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/stm32-usart.c
drivers/tty/serial/stm32-usart.h