Skip to content
Permalink
Browse files

usb: drivers: usb_dc_stm32: Fix coverity issue

Add __ASSERT() for coverity issue CID: 198874. Assert is used instead
of check since this is callback we get from stm32cube.

Fixes #16573

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
  • Loading branch information...
finikorg authored and carlescufi committed Jun 5, 2019
1 parent eba81c6 commit 1d61bef39e701e83b31c1a5b54f09e4f4dada7dc
Showing with 2 additions and 0 deletions.
  1. +2 −0 drivers/usb/device/usb_dc_stm32.c
@@ -1009,6 +1009,8 @@ void HAL_PCD_DataInStageCallback(PCD_HandleTypeDef *hpcd, u8_t epnum)

LOG_DBG("epnum 0x%02x", epnum);

__ASSERT(ep_state, "No corresponding ep_state for ep");

k_sem_give(&ep_state->write_sem);

if (ep_state->cb) {

0 comments on commit 1d61bef

Please sign in to comment.
You can’t perform that action at this time.