Skip to content
Permalink
Browse files

usb: usb_dc_native_posix: Check endpoint is valid

Fix harness tests.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
  • Loading branch information...
finikorg authored and nashif committed Mar 27, 2019
1 parent 582b440 commit 53ab1e2414b01ece332aff8eacecfd0a80e0c7e5
Showing with 5 additions and 0 deletions.
  1. +5 −0 drivers/usb/device/usb_dc_native_posix.c
@@ -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;
}

0 comments on commit 53ab1e2

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