diff options
author | Amit Virdi <amit.virdi@st.com> | 2014-12-19 02:10:17 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-01-12 13:13:24 -0500 |
commit | 110381e11b5fbf84bc0994d4c3f4629bc362ab4c (patch) | |
tree | 4362aad21bdd85ff44657d812c5033abede6bc32 | |
parent | 997f4f81dff243858b6cdd8c3ddb39e05a050c22 (diff) |
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>
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index bd9f48d0dff8..4e2593993fae 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c | |||
@@ -352,9 +352,6 @@ static int dwc3_alloc_trb_pool(struct dwc3_ep *dep) | |||
352 | if (dep->trb_pool) | 352 | if (dep->trb_pool) |
353 | return 0; | 353 | return 0; |
354 | 354 | ||
355 | if (dep->number == 0 || dep->number == 1) | ||
356 | return 0; | ||
357 | |||
358 | dep->trb_pool = dma_alloc_coherent(dwc->dev, | 355 | dep->trb_pool = dma_alloc_coherent(dwc->dev, |
359 | sizeof(struct dwc3_trb) * DWC3_TRB_NUM, | 356 | sizeof(struct dwc3_trb) * DWC3_TRB_NUM, |
360 | &dep->trb_pool_dma, GFP_KERNEL); | 357 | &dep->trb_pool_dma, GFP_KERNEL); |