zephyr/drivers/console
Christopher Friedt a05c88daa5 drivers: console: uart_console: avoid infinite loop in isr
Previously, the `uart_console_isr()` routine assumed that the
return value of several uart API functions would only ever
return the equivalent of a boolean value. In fact, an integer
is returned on occasion, and that integer can take on many
values.

Since unary operations would either go to "true" or "false"
and since any non-zero integer evaluates to "true", even a
return value of something like `-ENODEV` would evalueate
to true.

Explicitly compare against the integer-equivalent value of
the expected boolean output.

With this, in the case of errors, negative return values do
not evaluate to "true", and the infinite loop is avoied.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-09-25 09:51:45 +02:00
..
CMakeLists.txt
Kconfig
Kconfig.gsm_mux
efi_console.c
gsm_mux.c
gsm_mux.h
ipm_console.c
ipm_console_receiver.c
ipm_console_sender.c
jailhouse_debug_console.c
posix_arch_console.c
ram_console.c
rtt_console.c
semihost_console.c
uart_console.c drivers: console: uart_console: avoid infinite loop in isr 2023-09-25 09:51:45 +02:00
uart_mcumgr.c
uart_mux.c
uart_mux_internal.h
winstream_console.c
xtensa_sim_console.c