mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-08-24 19:28:30 +08:00
When rx_bufsz or tx_bufsz is 0, the driver returns -RT_EPERM but falls through to RT_ASSERT(rx_fifo/tx_fifo != RT_NULL). Since serial_rx/serial_tx is NULL in non-buffered mode, this triggers an assertion failure. Add break after setting ret = -RT_EPERM in the four affected cases: - RT_SERIAL_CTRL_SET_RX_TIMEOUT - RT_SERIAL_CTRL_SET_TX_TIMEOUT - RT_SERIAL_CTRL_GET_RX_TIMEOUT - RT_SERIAL_CTRL_GET_TX_TIMEOUT