summaryrefslogtreecommitdiff
path: root/src/host
diff options
context:
space:
mode:
authorhathach <[email protected]>2020-05-04 00:29:52 +0700
committerhathach <[email protected]>2020-05-04 00:29:52 +0700
commit4a3a44834048006b05d82d32e1f69be856554d4d (patch)
tree9b1a53cdfe8c8c47808c1b87ea3afcf3448d5d27 /src/host
parent9538ca7d74fbf5644c1e3a9747f0ad0c3e1a28d2 (diff)
clean up things, add makefile for host example
Diffstat (limited to 'src/host')
-rw-r--r--src/host/ehci/ehci.c6
1 files changed, 4 insertions, 2 deletions
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;
}