Jelajahi Sumber

usb: dwc3: gadget: Remove redundant check

dwc3_gadget_init_hw_endpoints calls dwc3_alloc_trb_pool only if epnum is not
equal to 0 or 1. Hence, rechecking it in the called function is redundant.

Signed-off-by: Amit Virdi <amit.virdi@st.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Amit Virdi 10 tahun lalu
induk
melakukan
110381e11b
1 mengubah file dengan 0 tambahan dan 3 penghapusan
  1. 0 3
      drivers/usb/dwc3/gadget.c

+ 0 - 3
drivers/usb/dwc3/gadget.c

@@ -352,9 +352,6 @@ static int dwc3_alloc_trb_pool(struct dwc3_ep *dep)
 	if (dep->trb_pool)
 		return 0;
 
-	if (dep->number == 0 || dep->number == 1)
-		return 0;
-
 	dep->trb_pool = dma_alloc_coherent(dwc->dev,
 			sizeof(struct dwc3_trb) * DWC3_TRB_NUM,
 			&dep->trb_pool_dma, GFP_KERNEL);