Commit 572aaa97 authored by Sebastian Andrzej Siewior's avatar Sebastian Andrzej Siewior Committed by Luis Henriques

usb: musb: stuff leak of struct usb_hcd

commit 68693b8e upstream.

since the split of host+gadget mode in commit 74c2e936 ("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: 74c2e936 ("usb: musb: factor out hcd initalization")
Cc: Daniel Mack <zonque@gmail.com>
Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent 02db7d0c
......@@ -2662,7 +2662,6 @@ void musb_host_cleanup(struct musb *musb)
if (musb->port_mode == MUSB_PORT_MODE_GADGET)
return;
usb_remove_hcd(musb->hcd);
musb->hcd = NULL;
}
void musb_host_free(struct musb *musb)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment