Skip to content
Permalink
Browse files

drivers: usb_dc_nrfx: validate pointer in usb_dc_ep_is_stalled

Validate pointer argument in usb_dc_ep_is_stalled.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
  • Loading branch information...
jfischer-phytec-iot authored and ioannisg committed Jul 1, 2019
1 parent cb37505 commit eb57607c7d761f076d9f4abd03b22e933a2898b2
Showing with 4 additions and 0 deletions.
  1. +4 −0 drivers/usb/device/usb_dc_nrfx.c
@@ -1545,6 +1545,10 @@ int usb_dc_ep_is_stalled(const u8_t ep, u8_t *const stalled)
return -EINVAL;
}

if (!stalled) {
return -EINVAL;
}

*stalled = (u8_t) nrfx_usbd_ep_stall_check(ep_addr_to_nrfx(ep));

return 0;

0 comments on commit eb57607

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