Commit 81699fed3caad746f435824b3130c5c2e957557d

Authored by Sebastian Andrzej Siewior
Committed by Greg Kroah-Hartman
1 parent 99688ecfbc

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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Showing 1 changed file with 0 additions and 1 deletions Side-by-side Diff

drivers/usb/musb/musb_host.c
... ... @@ -2663,7 +2663,6 @@
2663 2663 if (musb->port_mode == MUSB_PORT_MODE_GADGET)
2664 2664 return;
2665 2665 usb_remove_hcd(musb->hcd);
2666   - musb->hcd = NULL;
2667 2666 }
2668 2667  
2669 2668 void musb_host_free(struct musb *musb)