summaryrefslogtreecommitdiff
path: root/src/host
diff options
context:
space:
mode:
authorhathach <[email protected]>2025-02-12 11:34:32 +0700
committerhathach <[email protected]>2025-02-12 11:34:32 +0700
commit85247e50ddc17347fca1f6c9b9fedb1227eda25f (patch)
tree5828430e5ebfd32fbaf0c7e4cb7a1b39fdd6f04e /src/host
parent87adc63226a59e6c2602b1bc453ced77d44fedba (diff)
clean up
Diffstat (limited to 'src/host')
-rw-r--r--src/host/usbh.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/host/usbh.c b/src/host/usbh.c
index 6f7a8b8bf..30a4f5f63 100644
--- a/src/host/usbh.c
+++ b/src/host/usbh.c
@@ -1488,7 +1488,9 @@ static void process_enumeration(tuh_xfer_t* xfer) {
dev->i_product = desc_device->iProduct;
dev->i_serial = desc_device->iSerialNumber;
- if (tuh_desc_device_cb) tuh_desc_device_cb(daddr, (tusb_desc_device_t const*) _usbh_ctrl_buf);
+ if (tuh_desc_device_cb) {
+ tuh_desc_device_cb(daddr, (tusb_desc_device_t const*) _usbh_ctrl_buf);
+ }
// Get 9-byte for total length
uint8_t const config_idx = CONFIG_NUM - 1;
@@ -1517,7 +1519,9 @@ static void process_enumeration(tuh_xfer_t* xfer) {
}
case ENUM_SET_CONFIG:
- if (tuh_desc_config_cb) tuh_desc_config_cb(daddr, (const tusb_desc_configuration_t*) _usbh_ctrl_buf);
+ if (tuh_desc_config_cb) {
+ tuh_desc_config_cb(daddr, (const tusb_desc_configuration_t*) _usbh_ctrl_buf);
+ }
TU_ASSERT(tuh_configuration_set(daddr, CONFIG_NUM, process_enumeration, ENUM_CONFIG_DRIVER),);
break;