Skip to content

Commit f373c69

Browse files
authored
garbage collect always-true condition check (#2305)
garbage collect dead code
1 parent 5b3ada1 commit f373c69

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

board/drivers/usb.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -502,11 +502,8 @@ static void usb_setup(void) {
502502
control_req.length = setup.b.wLength.w;
503503

504504
resp_len = comms_control_handler(&control_req, response);
505-
// response pending if -1 was returned
506-
if (resp_len != -1) {
507-
USB_WritePacket(response, MIN(resp_len, setup.b.wLength.w), 0);
508-
USBx_OUTEP(0U)->DOEPCTL |= USB_OTG_DOEPCTL_CNAK;
509-
}
505+
USB_WritePacket(response, MIN(resp_len, setup.b.wLength.w), 0);
506+
USBx_OUTEP(0U)->DOEPCTL |= USB_OTG_DOEPCTL_CNAK;
510507
}
511508
}
512509

0 commit comments

Comments
 (0)