From 3ec5f4efa1de4342aaab742008dc630091e5e035 Mon Sep 17 00:00:00 2001 From: Luca Burelli Date: Thu, 11 May 2023 15:13:36 +0200 Subject: [PATCH] HardwareSerial: fix begin() lock issue on error path (#8182) * HardwareSerial: fix begin() lock issue on error path If the user supplied a wrong UART number, the begin() method would return without releasing the lock. Add missing unlock call. * removing unsed Case test --------- Co-authored-by: Rodrigo Garcia --- cores/esp32/HardwareSerial.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/cores/esp32/HardwareSerial.cpp b/cores/esp32/HardwareSerial.cpp index e60588f93..e2b12bda3 100644 --- a/cores/esp32/HardwareSerial.cpp +++ b/cores/esp32/HardwareSerial.cpp @@ -365,9 +365,6 @@ void HardwareSerial::begin(unsigned long baud, uint32_t config, int8_t rxPin, in } break; #endif - default: - log_e("Bad UART Number"); - return; } }