usb: gadget: midi: free hs descriptors
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Mon, 22 Oct 2012 20:15:02 +0000 (22:15 +0200)
committerFelipe Balbi <balbi@ti.com>
Wed, 31 Oct 2012 13:05:20 +0000 (15:05 +0200)
The HS descriptors are only created if HS is supported by the UDC but we
never free them.

Cc: stable <stable@vger.kernel.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/f_midi.c

index b2522ba..b978c5d 100644 (file)
@@ -415,6 +415,7 @@ static void f_midi_unbind(struct usb_configuration *c, struct usb_function *f)
        midi->id = NULL;
 
        usb_free_descriptors(f->descriptors);
+       usb_free_descriptors(f->hs_descriptors);
        kfree(midi);
 }