usb: drivers: usb_dc_stm32: Fix coverity issue

Fixes coverity issue CID: 198865.

Fixes #16582

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This commit is contained in:
Andrei Emeltchenko 2019-06-05 15:47:27 +03:00 committed by Carles Cufí
commit d385db0884

View file

@ -963,6 +963,8 @@ void HAL_PCD_SetupStageCallback(PCD_HandleTypeDef *hpcd)
LOG_DBG("");
ep_state = usb_dc_stm32_get_ep_state(EP0_OUT); /* can't fail for ep0 */
__ASSERT(ep_state, "No corresponding ep_state for EP0");
ep_state->read_count = SETUP_SIZE;
ep_state->read_offset = 0U;
memcpy(&usb_dc_stm32_state.ep_buf[EP0_IDX],