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 <rodrigo.garcia@espressif.com>
This commit is contained in:
parent
a2c892073b
commit
3ec5f4efa1
1 changed files with 0 additions and 3 deletions
|
|
@ -365,9 +365,6 @@ void HardwareSerial::begin(unsigned long baud, uint32_t config, int8_t rxPin, in
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
default:
|
|
||||||
log_e("Bad UART Number");
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue