summaryrefslogtreecommitdiff
path: root/drivers/usb/dwc3/core.c
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2013-02-08 17:14:16 +0400
committerFelipe Balbi <balbi@ti.com>2013-03-04 11:33:22 +0400
commitd9b4330adec006c2e8907bdcacd9dcc0e8874d18 (patch)
tree42e3b30d55427dc751b0397ff2a0b970dd8ef96e /drivers/usb/dwc3/core.c
parent6dbe51c251a327e012439c4772097a13df43c5b8 (diff)
downloadlinux-d9b4330adec006c2e8907bdcacd9dcc0e8874d18.tar.xz
usb: dwc3: core: don't forget to free coherent memory
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(). Cc: <stable@vger.kernel.org> # v3.7 v3.8 Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3/core.c')
-rw-r--r--drivers/usb/dwc3/core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 999909451e37..ffa6b004a84b 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -583,6 +583,7 @@ static int dwc3_remove(struct platform_device *pdev)
break;
}
+ dwc3_free_event_buffers(dwc);
dwc3_core_exit(dwc);
return 0;