diff --git a/usb/device/targets/TARGET_STM/USBPhy_STM32.cpp b/usb/device/targets/TARGET_STM/USBPhy_STM32.cpp index 472b2021f5..e8ab482f75 100644 --- a/usb/device/targets/TARGET_STM/USBPhy_STM32.cpp +++ b/usb/device/targets/TARGET_STM/USBPhy_STM32.cpp @@ -473,7 +473,7 @@ void USBPhyHw::endpoint_abort(usb_ep_t endpoint) // TODO - stop the current transfer on this endpoint and don't call the IN or OUT callback HAL_StatusTypeDef ret; ret = HAL_PCD_EP_Abort(&hpcd, endpoint); - MBED_ASSERT(ret!=HAL_OK); + MBED_ASSERT(ret==HAL_OK); return; }