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>
This commit is contained in:
Johann Fischer 2019-07-02 01:15:33 +02:00 committed by Ioannis Glaropoulos
commit eb57607c7d

View file

@ -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;