Skip to content
Commit 67a265b0 authored by Johann Fischer's avatar Johann Fischer Committed by Carles Cufí
Browse files

samples: cdc_acm: check return value of uart_fifo_read()



uart_fifo_read() can return negative values in case
it is not implemented or CONFIG_UART_INTERRUPT_DRIVEN
is not enabled. Both cases can not actually happen in the
case of CDC ACM UART, check it anyway in case behavior
of the UART API changes unnoticed.

Align the code in RX path code of both camples and
enable TX interrupt only if data was received successfully.

Fixes: #39835
Fixes: #39824
Fixes: #39809
Coverity-CID: 240667
Coverity-CID: 240679
Coverity-CID: 240697

Signed-off-by: default avatarJohann Fischer <johann.fischer@nordicsemi.no>
parent 5e035b0f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment