ehci-hcd: Cleanup memory resources when ehci_halt fails
authorJia-Ju Bai <baijiaju1990@163.com>
Mon, 4 Jan 2016 08:14:43 +0000 (16:14 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Jan 2016 04:51:34 +0000 (20:51 -0800)
commitd8ff463a4ef22f090df21a3c5b34b336e80b72ca
tree5d44025803ae1fdd22839090dfc56191e6a118cb
parent4bb3cad7125ba03255025cf1e4e7c638e4757f6c
ehci-hcd: Cleanup memory resources when ehci_halt fails

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