summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2026-06-19 21:00:01 +0700
committerhathach <[email protected]>2026-06-19 21:00:01 +0700
commitab7888bc8f02226afbba662c7b7fcf265faa17a3 (patch)
treea90941336fa3adf8c7e3495b7aab108031df2594
parent3c54098801b1f32cd699b7a64a6a5bf4724ba088 (diff)
video: assert usbd_edpt_iso_activate() result in _open_vs_itf()
The isochronous streaming endpoint was activated with the usbd_edpt_iso_activate() return value ignored, unlike every neighbouring open in the same function (usbd_edpt_open() is wrapped in TU_ASSERT on both the non-ISO-alloc fallback and the bulk branch). When a DCD refuses the iso endpoint -- e.g. it has no isochronous support, or the requested packet size does not fit its endpoint buffers -- that failure was silently swallowed and the alternate setting was reported as opened, leaving the host streaming to an endpoint the device never armed. Wrap it in TU_ASSERT so the open fails cleanly and the refusal propagates, matching the adjacent endpoint-open calls. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
-rw-r--r--src/class/video/video_device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/class/video/video_device.c b/src/class/video/video_device.c
index bbcfe45d5..e31ab4194 100644
--- a/src/class/video/video_device.c
+++ b/src/class/video/video_device.c
@@ -865,7 +865,7 @@ static bool _open_vs_itf(uint8_t rhport, videod_streaming_interface_t *stm, uint
/* FS must be less than or equal to max packet size */
TU_VERIFY (tu_edpt_packet_size(ep) >= max_size);
#ifdef TUP_DCD_EDPT_ISO_ALLOC
- usbd_edpt_iso_activate(rhport, ep);
+ TU_ASSERT(usbd_edpt_iso_activate(rhport, ep));
#else
TU_ASSERT(usbd_edpt_open(rhport, ep));
#endif