Skip to contentSkip to conversation

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

PATCH Applied [email protected] 2 participants 2 messages Mar 31 – Apr 13

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: dwc2: host: initialize sub to fix maybe-uninitialized warning

From: Chali Anis <[email protected]>

---
 drivers/usb/dwc2/host.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/dwc2/host.c +1 -1
index a9b25aeeaa11..93994f0be3be 100644
@@ -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;