]> git.baikalelectronics.ru Git - kernel.git/commit
usb: dwc3: core: don't forget to free coherent memory
authorFelipe Balbi <balbi@ti.com>
Fri, 8 Feb 2013 13:14:16 +0000 (15:14 +0200)
committerFelipe Balbi <balbi@ti.com>
Mon, 4 Mar 2013 07:33:22 +0000 (09:33 +0200)
commitc7cc9bac1b8890e196b8065ac3112dd5d0def321
tree42e3b30d55427dc751b0397ff2a0b970dd8ef96e
parent5d5acf7f3e8c669857f1288b923731e4b4ceb550
usb: dwc3: core: don't forget to free coherent memory

commit 12d722e (usb: dwc3: core: move
event buffer allocation out of
dwc3_core_init()) introduced a memory leak
of the coherent memory we use as event
buffers on dwc3 driver.

If the driver is compiled as a dynamically
loadable module and use constantly loads
and unloads the driver, we will continue
to leak the coherent memory allocated during
->probe() because dwc3_free_event_buffers()
is never called during ->remove().

Cc: <stable@vger.kernel.org> # v3.7 v3.8
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/core.c