]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: dwc3: gadget: free trb pool only from epnum 2
authorGeorge Cherian <george.cherian@ti.com>
Mon, 27 May 2013 09:05:49 +0000 (14:35 +0530)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 19 Jun 2013 01:16:49 +0000 (02:16 +0100)
commit5b9ce8be3223c6d68e7581b0de59f6a92ccdd02d
treefe195462738d60efb9bf044b566f0fcf7f30ca7b
parent50e293cfbfee3a048ce0f6c04bca8899b20ca353
usb: dwc3: gadget: free trb pool only from epnum 2

commit 5bf8fae33d14cc5c3c53a926f9079f92c8b082b0 upstream.

we never allocate a TRB pool for physical endpoints
0 and 1 so trying to free it (a invalid TRB pool pointer)
will lead us in a warning while removing dwc3.ko module.

In order to fix the situation, all we have to do is skip
dwc3_free_trb_pool() for physical endpoints 0 and 1 just
as we while deleting endpoints from the endpoints list.

Signed-off-by: George Cherian <george.cherian@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/dwc3/gadget.c