projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4bb3cad
)
ehci-hcd: Cleanup memory resources when ehci_halt fails
author
Jia-Ju Bai
<baijiaju1990@163.com>
Mon, 4 Jan 2016 08:14:43 +0000
(16:14 +0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Mon, 25 Jan 2016 04:51:34 +0000
(20:51 -0800)
The driver calls ehci_mem_init to allocate memory resources.
But these resources are not freed when ehci_halt fails.
This patch adds "ehci_mem_cleanup" in error handling code to fix this problem.
Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ehci-hcd.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/usb/host/ehci-hcd.c
b/drivers/usb/host/ehci-hcd.c
index 14178bbf069496aba61a03ab3589945d9bbf721a..00e77cc91053a48cf6b9ea1e5f2d5bd49b468403 100644
(file)
--- a/
drivers/usb/host/ehci-hcd.c
+++ b/
drivers/usb/host/ehci-hcd.c
@@
-675,8
+675,10
@@
int ehci_setup(struct usb_hcd *hcd)
return retval;
retval = ehci_halt(ehci);
- if (retval)
+ if (retval) {
+ ehci_mem_cleanup(ehci);
return retval;
+ }
ehci_reset(ehci);