summaryrefslogtreecommitdiff
path: root/src/host
diff options
context:
space:
mode:
authorhathach <[email protected]>2024-04-08 22:07:56 +0700
committerhathach <[email protected]>2024-04-08 22:07:56 +0700
commitc3c06484560d0102366a3a1b1101c35301009f97 (patch)
tree408f8d600c6b58fd1da77c0408182851c0f48ced /src/host
parent47c12a07f2edf927eaa685ee8c32b222271d770f (diff)
add class driver deinit
Diffstat (limited to 'src/host')
-rw-r--r--src/host/usbh.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/host/usbh.c b/src/host/usbh.c
index aa0603d47..6a5491998 100644
--- a/src/host/usbh.c
+++ b/src/host/usbh.c
@@ -425,7 +425,7 @@ bool tuh_deinit(uint8_t rhport) {
// Class drivers
for (uint8_t drv_id = 0; drv_id < TOTAL_DRIVER_COUNT; drv_id++) {
usbh_class_driver_t const* driver = get_driver(drv_id);
- if (driver) {
+ if (driver && driver->deinit) {
TU_LOG_USBH("%s deinit\r\n", driver->name);
driver->deinit();
}