Unverified Commit 3ec5f4ef authored by Luca Burelli's avatar Luca Burelli Committed by GitHub

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: default avatarRodrigo Garcia <rodrigo.garcia@espressif.com>
parent a2c89207
......@@ -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;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment