summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2024-04-02 22:47:50 +0700
committerGitHub <[email protected]>2024-04-02 22:47:50 +0700
commitf8dc3b97beae611c0a68ab50b960dd1922a66f5d (patch)
tree083528a2bb24b806e3ab83b10985faa571223ffd /src
parenta70109697f18f1e1df42f73295daa3d9bf1214dc (diff)
check cfg_param pointer
Diffstat (limited to 'src')
-rw-r--r--src/portable/analog/max3421/hcd_max3421.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/portable/analog/max3421/hcd_max3421.c b/src/portable/analog/max3421/hcd_max3421.c
index fa6d45d3e..242c65501 100644
--- a/src/portable/analog/max3421/hcd_max3421.c
+++ b/src/portable/analog/max3421/hcd_max3421.c
@@ -451,7 +451,7 @@ static max3421_ep_t * find_next_pending_ep(max3421_ep_t * cur_ep) {
// optional hcd configuration, called by tuh_configure()
bool hcd_configure(uint8_t rhport, uint32_t cfg_id, const void* cfg_param) {
(void) rhport;
- TU_VERIFY(cfg_id == TUH_CFGID_MAX3421);
+ TU_VERIFY(cfg_id == TUH_CFGID_MAX3421 && cfg_param != NULL);
tuh_configure_param_t const* cfg = (tuh_configure_param_t const*) cfg_param;
_max_nak = tu_min8(cfg->max3421.max_nak, EP_STATE_ATTEMPT_MAX-EP_STATE_ATTEMPT_1);