Skip to content

Commit fa59051

Browse files
Przemyslaw Bidafabiobaltieri
authored andcommitted
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 <[email protected]>
1 parent 8c3568f commit fa59051

File tree

1 file changed

+1
-1
lines changed
  • modules/openthread/platform

1 file changed

+1
-1
lines changed

modules/openthread/platform/uart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ otError otPlatUartEnable(void)
173173
uint32_t dtr = 0U;
174174

175175
ret = usb_enable(NULL);
176-
if (ret != 0) {
176+
if (ret != 0 && ret != -EALREADY) {
177177
LOG_ERR("Failed to enable USB");
178178
return OT_ERROR_FAILED;
179179
}

0 commit comments

Comments
 (0)