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:
parent
cb37505976
commit
eb57607c7d
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue