mirror of https://github.com/ARMmbed/mbed-os.git
Fix off-by-one error in NRF52 serial implementation
parent
18fa9414cd
commit
b9f91b3839
|
@ -1104,7 +1104,8 @@ void serial_free(serial_t *obj)
|
|||
|
||||
int instance = uart_object->instance;
|
||||
|
||||
if (nordic_nrf5_uart_state[instance].usage_counter > 1) {
|
||||
/* Only consider disabling UARTE if number of users is not zero. */
|
||||
if (nordic_nrf5_uart_state[instance].usage_counter > 0) {
|
||||
|
||||
/* Decrement usage counter for this instance. */
|
||||
nordic_nrf5_uart_state[instance].usage_counter--;
|
||||
|
|
Loading…
Reference in New Issue