diff options
| author | sakimisu <[email protected]> | 2022-12-07 21:38:20 +0800 |
|---|---|---|
| committer | sakimisu <[email protected]> | 2022-12-07 21:38:20 +0800 |
| commit | 051c380f3beda877d67ccf261f294d8fc1fc992f (patch) | |
| tree | bc39d1c99c6a1441832a992d8aaeccc3a41f403b | |
| parent | 4f83b333a0360ad3e867554cef1de4227006e2fb (diff) | |
reset hport bNumInterfaces when enum fails
| -rw-r--r-- | core/usbh_core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/usbh_core.c b/core/usbh_core.c index 6869bfbb..f9bfb3f1 100644 --- a/core/usbh_core.c +++ b/core/usbh_core.c @@ -625,6 +625,7 @@ int usbh_enumerate(struct usbh_hubport *hport) errout: if (ret < 0) { + hport->config.config_desc.bNumInterfaces = 0; usbh_hport_deactivate_ep0(hport); } if (hport->raw_config_desc) { |
