usb_dc_stm32: Fix check endpoint capabilities
DT_USB_NUM_BIDIR_ENDPOINTS includes EP0, which we should not take it into account when we check endpoint capabilities Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
This commit is contained in:
parent
d942c1d718
commit
6a676caab6
1 changed files with 1 additions and 1 deletions
|
@ -557,7 +557,7 @@ int usb_dc_ep_check_cap(const struct usb_dc_ep_cfg_data * const cfg)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ep_idx > DT_USB_NUM_BIDIR_ENDPOINTS) {
|
if (ep_idx > (DT_USB_NUM_BIDIR_ENDPOINTS - 1)) {
|
||||||
LOG_ERR("endpoint index/address out of range");
|
LOG_ERR("endpoint index/address out of range");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue