diff --git a/drivers/usb/device/usb_dc_stm32.c b/drivers/usb/device/usb_dc_stm32.c index 6677dbf783b..37b232da7c5 100644 --- a/drivers/usb/device/usb_dc_stm32.c +++ b/drivers/usb/device/usb_dc_stm32.c @@ -627,14 +627,14 @@ int usb_dc_ep_configure(const struct usb_dc_ep_cfg_data * const ep_cfg) uint8_t ep = ep_cfg->ep_addr; struct usb_dc_stm32_ep_state *ep_state = usb_dc_stm32_get_ep_state(ep); - LOG_DBG("ep 0x%02x, previous ep_mps %u, ep_mps %u, ep_type %u", - ep_cfg->ep_addr, ep_state->ep_mps, ep_cfg->ep_mps, - ep_cfg->ep_type); - if (!ep_state) { return -EINVAL; } + LOG_DBG("ep 0x%02x, previous ep_mps %u, ep_mps %u, ep_type %u", + ep_cfg->ep_addr, ep_state->ep_mps, ep_cfg->ep_mps, + ep_cfg->ep_type); + #ifdef USB if (ep_cfg->ep_mps > ep_state->ep_pma_buf_len) { if (USB_RAM_SIZE <=