usb: usb_dc_kinetis: Fix endpoint index check
Fix check for maximum endpoint index. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This commit is contained in:
parent
40774007c3
commit
5b74fb4f23
1 changed files with 1 additions and 1 deletions
|
@ -281,7 +281,7 @@ int usb_dc_ep_check_cap(const struct usb_dc_ep_cfg_data * const cfg)
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (ep_idx > NUM_OF_EP_MAX) {
|
||||
if (ep_idx > (NUM_OF_EP_MAX - 1)) {
|
||||
LOG_ERR("endpoint index/address out of range");
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue