[PATCH] usb: dwc2: host: initialize sub to fix maybe-uninitialized warning

chalianis1 at gmail.com chalianis1 at gmail.com
Mon Mar 30 20:23:07 PDT 2026


From: Chali Anis <chalianis1 at gmail.com>

Signed-off-by: Chali Anis <chalianis1 at gmail.com>
---
 drivers/usb/dwc2/host.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/dwc2/host.c b/drivers/usb/dwc2/host.c
index a9b25aeeaa11..93994f0be3be 100644
--- a/drivers/usb/dwc2/host.c
+++ b/drivers/usb/dwc2/host.c
@@ -168,7 +168,7 @@ static int transfer_chunk(struct dwc2 *dwc2, u8 hc,
 			  u8 *pid, int in, void *buffer, int num_packets,
 			  int xfer_len, int *actual_len, int odd_frame)
 {
-	uint32_t hctsiz, hcchar, sub;
+	uint32_t hctsiz, hcchar, sub = 0;
 	dma_addr_t dma_addr = 0;
 	int ret = 0;
 



More information about the barebox mailing list