diff options
author | Felipe Balbi <balbi@ti.com> | 2013-02-08 15:14:16 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-20 13:10:52 -0700 |
commit | d6539025b73f46c486c6c06f87b778ab3e93e8f8 (patch) | |
tree | ae2675d71a20814dc9fb65a2c65e6b50acd23c95 /drivers | |
parent | ee30bf86f6a7f6f8524f64852af01edff6ba231c (diff) |
usb: dwc3: core: don't forget to free coherent memory
commit d9b4330adec006c2e8907bdcacd9dcc0e8874d18 upstream.
commit 3921426 (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().
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/dwc3/core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 3a4004a620ad..f00c74978b7a 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -575,6 +575,7 @@ static int dwc3_remove(struct platform_device *pdev) break; } + dwc3_free_event_buffers(dwc); dwc3_core_exit(dwc); return 0; |