net: openthread: Fix double initialization problem in openthread usb.

nRF52 in case of USB CDC required `CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n`
Due to incorrect error check in `otPlatUartEnable`.

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
This commit is contained in:
Przemyslaw Bida 2023-05-19 11:27:45 +02:00 committed by Fabio Baltieri
commit fa590519e2

View file

@ -173,7 +173,7 @@ otError otPlatUartEnable(void)
uint32_t dtr = 0U;
ret = usb_enable(NULL);
if (ret != 0) {
if (ret != 0 && ret != -EALREADY) {
LOG_ERR("Failed to enable USB");
return OT_ERROR_FAILED;
}