summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2026-01-13 23:19:24 +0700
committerGitHub <[email protected]>2026-01-13 23:19:24 +0700
commit2656c6d91e8a544cf94247724ebf360c1b66d567 (patch)
tree0f7d76962e0d8206f7191ec9d3717f069235b20d
parent72da5f982d63ffae8fe248e45fe3b825ea65d4fc (diff)
parentaa183a50fc4bd7ca0c50f97477fe15bcd7020528 (diff)
Merge pull request #3424 from hathach/fifo_read_epsize
limit fifo read size to ep_bufsize regardless ep_buf is used or not
-rw-r--r--src/tusb.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/tusb.c b/src/tusb.c
index ed254a10b..256aa832f 100644
--- a/src/tusb.c
+++ b/src/tusb.c
@@ -485,9 +485,7 @@ uint32_t tu_edpt_stream_read_xfer(tu_edpt_stream_t *s) {
if (available >= s->mps) {
// multiple of packet size limit by ep bufsize
uint16_t count = (uint16_t) (available & ~(s->mps - 1));
- if (s->ep_buf != NULL) {
- count = tu_min16(count, s->ep_bufsize);
- }
+ count = tu_min16(count, s->ep_bufsize);
TU_ASSERT(stream_xfer(s, count), 0);
return count;
} else {