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:
parent
8c3568f213
commit
fa590519e2
1 changed files with 1 additions and 1 deletions
|
@ -173,7 +173,7 @@ otError otPlatUartEnable(void)
|
||||||
uint32_t dtr = 0U;
|
uint32_t dtr = 0U;
|
||||||
|
|
||||||
ret = usb_enable(NULL);
|
ret = usb_enable(NULL);
|
||||||
if (ret != 0) {
|
if (ret != 0 && ret != -EALREADY) {
|
||||||
LOG_ERR("Failed to enable USB");
|
LOG_ERR("Failed to enable USB");
|
||||||
return OT_ERROR_FAILED;
|
return OT_ERROR_FAILED;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue