usb: usb_dc_native_posix: Check endpoint is valid
Fix harness tests. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This commit is contained in:
parent
582b44014c
commit
53ab1e2414
1 changed files with 5 additions and 0 deletions
|
@ -304,6 +304,11 @@ int usb_dc_ep_disable(const u8_t ep)
|
|||
{
|
||||
LOG_DBG("ep %x", ep);
|
||||
|
||||
if (!usbip_ctrl.attached || !usbip_ep_is_valid(ep)) {
|
||||
LOG_ERR("Not attached / Invalid endpoint: EP 0x%x", ep);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue