summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/class/cdc/cdc_host.c1
-rw-r--r--src/host/ehci/ehci.c6
2 files changed, 4 insertions, 3 deletions
diff --git a/src/class/cdc/cdc_host.c b/src/class/cdc/cdc_host.c
index 5e45e8f6b..6b36ea94d 100644
--- a/src/class/cdc/cdc_host.c
+++ b/src/class/cdc/cdc_host.c
@@ -86,7 +86,6 @@ bool tuh_cdc_serial_is_mounted(uint8_t dev_addr)
{
// TODO consider all AT Command as serial candidate
return tuh_cdc_mounted(dev_addr) &&
- (CDC_COMM_PROTOCOL_NONE <= cdch_data[dev_addr-1].itf_protocol) &&
(cdch_data[dev_addr-1].itf_protocol <= CDC_COMM_PROTOCOL_ATCOMMAND_CDMA);
}
diff --git a/src/host/ehci/ehci.c b/src/host/ehci/ehci.c
index 9ddffaf2c..bbad072bf 100644
--- a/src/host/ehci/ehci.c
+++ b/src/host/ehci/ehci.c
@@ -358,7 +358,7 @@ bool hcd_edpt_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_endpoint_t const
if ( dev_addr == 0 ) return true;
// Insert to list
- ehci_link_t * list_head;
+ ehci_link_t * list_head = NULL;
switch (ep_desc->bmAttributes.xfer)
{
@@ -378,8 +378,10 @@ bool hcd_edpt_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_endpoint_t const
default: break;
}
+ TU_ASSERT(list_head);
+
// TODO might need to disable async/period list
- list_insert( list_head, (ehci_link_t*) p_qhd, EHCI_QTYPE_QHD);
+ list_insert(list_head, (ehci_link_t*) p_qhd, EHCI_QTYPE_QHD);
return true;
}