]> git.baikalelectronics.ru Git - kernel.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)
committerFelipe Balbi <balbi@ti.com>
Tue, 28 May 2013 19:17:20 +0000 (22:17 +0300)
commitbe7cfd18c3a5cb87fd2f02d4053666c21e517bee
treed4510155df11add92afe6d8324342e87dd8ef73c
parentcf0346722573cbcf3e68ef0225e033406edc1b52
usb: dwc3: gadget: free trb pool only from epnum 2

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.

Cc: stable@vger.kernel.org
Signed-off-by: George Cherian <george.cherian@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/gadget.c