diff options
| author | aineoae86-sys <[email protected]> | 2026-07-05 15:38:17 +0800 |
|---|---|---|
| committer | aineoae86-sys <[email protected]> | 2026-07-05 15:38:17 +0800 |
| commit | 6912f23618d629a4d0d9ec5626df5fc79b329c80 (patch) | |
| tree | 76ba3d11191d7539e030149d4ad62a05cb347d24 | |
| parent | 41b8ad203990da258e98531c6bf77102c7cc7c68 (diff) | |
Fix usbd empty builtin driver warning
Generated-by: OpenAI Codex
Signed-off-by: aineoae86-sys <[email protected]>
| -rw-r--r-- | src/device/usbd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/device/usbd.c b/src/device/usbd.c index 70141a5bb..fc658f1c1 100644 --- a/src/device/usbd.c +++ b/src/device/usbd.c @@ -378,7 +378,7 @@ TU_ATTR_ALWAYS_INLINE static inline usbd_class_driver_t const * get_driver(uint8 driver = &_app_driver[drvid]; } else{ drvid -= _app_driver_count; - if (drvid < BUILTIN_DRIVER_COUNT) { + if (BUILTIN_DRIVER_COUNT > 0 && drvid < BUILTIN_DRIVER_COUNT) { driver = &_usbd_driver[drvid]; } } |
