Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 376718
b: refs/heads/master
c: 5bf8fae
h: refs/heads/master
v: v3
  • Loading branch information
George Cherian authored and Felipe Balbi committed May 28, 2013
1 parent 67cf66a commit 81a4737
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 022d0547aa8b00ff5035ba6207ebc2c08ea0a51f
refs/heads/master: 5bf8fae33d14cc5c3c53a926f9079f92c8b082b0
16 changes: 12 additions & 4 deletions trunk/drivers/usb/dwc3/gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -1706,11 +1706,19 @@ static void dwc3_gadget_free_endpoints(struct dwc3 *dwc)
dep = dwc->eps[epnum];
if (!dep)
continue;

dwc3_free_trb_pool(dep);

if (epnum != 0 && epnum != 1)
/*
* Physical endpoints 0 and 1 are special; they form the
* bi-directional USB endpoint 0.
*
* For those two physical endpoints, we don't allocate a TRB
* pool nor do we add them the endpoints list. Due to that, we
* shouldn't do these two operations otherwise we would end up
* with all sorts of bugs when removing dwc3.ko.
*/
if (epnum != 0 && epnum != 1) {
dwc3_free_trb_pool(dep);
list_del(&dep->endpoint.ep_list);
}

kfree(dep);
}
Expand Down

0 comments on commit 81a4737

Please sign in to comment.