mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 15:49:17 -04:00
usb: dwc3: core: Destroy ipc log context on remove
The IPC log context and the log buffers allocated are not destroyed upon remove, this will lead to memory leak and cause memory allocation failures, if the probe fails indefinitely. Change-Id: I6844507cb5c5bec4908f34b3f00090594d2cefcf Signed-off-by: Sriharsha Allenki <sallenki@codeaurora.org>
This commit is contained in:
parent
aa01bdf5fa
commit
2933225984
1 changed files with 2 additions and 0 deletions
|
|
@ -1724,6 +1724,8 @@ static int dwc3_remove(struct platform_device *pdev)
|
|||
|
||||
ipc_log_context_destroy(dwc->dwc_ipc_log_ctxt);
|
||||
dwc->dwc_ipc_log_ctxt = NULL;
|
||||
ipc_log_context_destroy(dwc->dwc_dma_ipc_log_ctxt);
|
||||
dwc->dwc_dma_ipc_log_ctxt = NULL;
|
||||
count--;
|
||||
dwc3_instance[dwc->index] = NULL;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue