usb: musb: core: properly free host / device structs in err path
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Wed, 16 Oct 2013 10:50:06 +0000 (12:50 +0200)
committerFelipe Balbi <balbi@ti.com>
Thu, 17 Oct 2013 16:30:33 +0000 (11:30 -0500)
The patch fixes two issues in the error path cleanup:
- in MUSB_PORT_MODE_DUAL_ROLE mode, if musb_gadget_setup() fails we
  never cleanup the host struct earlier allocated.
- if musb_init_debugfs() or sysfs_create_group() fails, then we never
  free the host part initialization, only device part.

Cc: stable@vger.kernel.org # v3.11
Cc: Daniel Mack <zonque@gmail.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>

No differences found