summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiFiPhile <[email protected]>2025-12-22 21:11:32 +0100
committerHiFiPhile <[email protected]>2025-12-22 21:11:32 +0100
commitaa183a50fc4bd7ca0c50f97477fe15bcd7020528 (patch)
treeaf69c28efbc35a01d65b10ffa6cccad17034abce
parent83fa3bbffe2237303ff1ae92fe0b6c8384073993 (diff)
limit fifo read size to ep_bufsize regardless ep_buf is used or not
Signed-off-by: HiFiPhile <[email protected]>
-rw-r--r--src/tusb.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/tusb.c b/src/tusb.c
index 8117c3e3e..9c5237d9f 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 {