From f373c69bbb3d1068f1dfc1323cd2fa37e974c389 Mon Sep 17 00:00:00 2001 From: Jason Young <46612682+jyoung8607@users.noreply.github.com> Date: Wed, 10 Dec 2025 16:00:20 -0500 Subject: [PATCH] garbage collect always-true condition check (#2305) garbage collect dead code --- board/drivers/usb.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/board/drivers/usb.h b/board/drivers/usb.h index 1f715fee..d393d7e4 100644 --- a/board/drivers/usb.h +++ b/board/drivers/usb.h @@ -502,11 +502,8 @@ static void usb_setup(void) { control_req.length = setup.b.wLength.w; resp_len = comms_control_handler(&control_req, response); - // response pending if -1 was returned - if (resp_len != -1) { - USB_WritePacket(response, MIN(resp_len, setup.b.wLength.w), 0); - USBx_OUTEP(0U)->DOEPCTL |= USB_OTG_DOEPCTL_CNAK; - } + USB_WritePacket(response, MIN(resp_len, setup.b.wLength.w), 0); + USBx_OUTEP(0U)->DOEPCTL |= USB_OTG_DOEPCTL_CNAK; } }