summaryrefslogtreecommitdiff
path: root/src/device/usbd_control.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/device/usbd_control.c')
-rw-r--r--src/device/usbd_control.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/device/usbd_control.c b/src/device/usbd_control.c
index 31f447c03..0b878fbcb 100644
--- a/src/device/usbd_control.c
+++ b/src/device/usbd_control.c
@@ -93,8 +93,10 @@ bool usbd_control_xfer(uint8_t rhport, tusb_control_request_t const * request, v
_control_state.total_len = tu_min16(len, request->wLength);
_control_state.total_transferred = 0;
- if ( (buffer != NULL) && len )
+ if ( len )
{
+ TU_ASSERT(buffer);
+
// Data stage
TU_ASSERT( start_control_data_xact(rhport) );
}else