usb: musb: stuff leak of struct usb_hcd
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Thu, 11 Dec 2014 17:14:18 +0000 (18:14 +0100)
committerJiri Slaby <jslaby@suse.cz>
Thu, 29 Jan 2015 14:44:40 +0000 (15:44 +0100)
commit3505b249a4750ba69b0224a5aba6978d321dead4
treed53cb027cb460758671f40f2159e95a57183bd6f
parent879e2c48f34bd5c41b7ea5902035dbce40931aaa
usb: musb: stuff leak of struct usb_hcd

commit 68693b8ea4e284c46bff919ac62bd9ccdfdbb6ba upstream.

since the split of host+gadget mode in commit 74c2e9360058 ("usb: musb:
factor out hcd initalization") we leak the usb_hcd struct. We call now
musb_host_cleanup() which does basically usb_remove_hcd() and also sets
the hcd variable to NULL. Doing so makes the finall call to
musb_host_free() basically a nop and the usb_hcd remains around for ever
without anowner.
This patch drops that NULL assignment for that reason.

Fixes: 74c2e9360058 ("usb: musb: factor out hcd initalization")
Cc: Daniel Mack <zonque@gmail.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/usb/musb/musb_host.c