platforms: nuttx: SerialImpl: fix hang if baudrate is 0 (#23238)

This commit is contained in:
Jacob Dahl authored and GitHub committed 2024-06-07 22:08:21 -06:00
1 parent 5c64a3ed93
commit 2882e5c4e1
1 file changed
+5
@@ -74,6 +74,11 @@ bool SerialImpl::configure()
int speed;
switch (_baudrate) {
case 0:
// special case, if baudrate is 0 it hangs entire system
PX4_ERR("baudrate not specified");
return false;
case 9600: speed = B9600; break;
case 19200: speed = B19200; break;